[PATCH] .gitignore: ignore smatch generated files

Brandon Pollack posted 1 patch 2 years, 7 months ago
There is a newer version of this series
.gitignore | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] .gitignore: ignore smatch generated files
Posted by Brandon Pollack 2 years, 7 months ago
ignore smatch generated files.

Signed-off-by: Brandon Pollack <brpol@chromium.org>

---

New to development and looking for tasks to work on to get familiar with
code, I noticed smatch generates some files at the root.  Since this
tool seems frequent for newbies like myself I thought it would be worth
getting rid of the chance of accidentally committing these files.
---
 .gitignore | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.gitignore b/.gitignore
index 70ec6037fa7a..04472c37b6df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,3 +173,11 @@ sphinx_*/
 
 # Rust analyzer configuration
 /rust-project.json
+
+# Smatch tree outputs
+smatch_compile.warns
+smatch_db.sqlite
+smatch_warns.txt
+smatch_warns.txt.caller_info
+smatch_warns.txt.sql
+trinity_smatch.[ch]
-- 
2.40.1.495.gc816e09b53d-goog
Re: [PATCH] .gitignore: ignore smatch generated files
Posted by Miguel Ojeda 2 years, 7 months ago
Hi Brandon,

On Thu, Apr 27, 2023 at 4:33 AM Brandon Pollack <brpol@chromium.org> wrote:
>
> ignore smatch generated files.

Cc'ing Dan who is the `smatch` author.

Also, when sending a v2 of a series, please mark it as such --
`git-format-patch` can do it for you with e.g. `-v2`.

Cheers,
Miguel
Re: [PATCH] .gitignore: ignore smatch generated files
Posted by Dan Carpenter 2 years, 7 months ago
Thanks for this.  To be honest, I hadn't remembered that Smatch
still generates trinity_smatch.[ch].  I would prefer to just delete that
stuff.  Another idea is maybe Smatch could put everything in a
smatch/ directory?  That feels like maybe it would be nicer?

regards,
dan carpenter
Re: [PATCH] .gitignore: ignore smatch generated files
Posted by Brandon Ross Pollack 2 years, 7 months ago
On Thu, Apr 27, 2023 at 8:20 PM Dan Carpenter <error27@gmail.com> wrote:
>
> Thanks for this.  To be honest, I hadn't remembered that Smatch
> still generates trinity_smatch.[ch].  I would prefer to just delete that
> stuff.  Another idea is maybe Smatch could put everything in a
> smatch/ directory?  That feels like maybe it would be nicer?

Sure, that'd be great as well.  I'm pretty sure that smatch outputs
these files from whatever directory you run from, that's why I did the
overall pattern rather than a path pattern.

Should we just patch smatch to not output trinity* files and output to
a directory and change this patch to mask out the directory?

>
> regards,
> dan carpenter
Re: [PATCH] .gitignore: ignore smatch generated files
Posted by Dan Carpenter 2 years, 7 months ago
On Fri, Apr 28, 2023 at 11:55:17AM +0900, Brandon Ross Pollack wrote:
> On Thu, Apr 27, 2023 at 8:20 PM Dan Carpenter <error27@gmail.com> wrote:
> >
> > Thanks for this.  To be honest, I hadn't remembered that Smatch
> > still generates trinity_smatch.[ch].  I would prefer to just delete that
> > stuff.  Another idea is maybe Smatch could put everything in a
> > smatch/ directory?  That feels like maybe it would be nicer?
> 
> Sure, that'd be great as well.  I'm pretty sure that smatch outputs
> these files from whatever directory you run from, that's why I did the
> overall pattern rather than a path pattern.
> 
> Should we just patch smatch to not output trinity* files and output to
> a directory and change this patch to mask out the directory?

I've deleted the trinity stuff.  Let's just apply the rest as-is.

regards,
dan carpenter