Re: [PATCH 3/5] coccinelle: exclude sha1dc source files from static analysis
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 23, 2018, 18:43 UTC
- Message-ID
- <CAM0VKjkJoqRFmXdnuujSaiZ=hvz6MeAmgoUQNAkZ+82ZrKtotw@mail.gmail.com>
- In-Reply-To
- <CAPig+cSOZd+t17j7FSCYAydS34ZtfcRFZyE6E9fz=u7xB-01Mg@mail.gmail.com>
On Mon, Jul 23, 2018 at 8:28 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 21 quoted lines
> > On Mon, Jul 23, 2018 at 9:51 AM SZEDER Gábor <szeder.dev@gmail.com> wrote: > > sha1dc is an external library, that we carry in-tree for convenience > > or grab as a submodule, so there is no use in applying our semantic > > patches to its source files. > > > > Therefore, exclude sha1dc's source files from Coccinelle's static > > analysis. > > > > Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> > > --- > > diff --git a/Makefile b/Makefile > > @@ -2666,10 +2666,16 @@ check: command-list.h > > +ifdef DC_SHA1_SUBMODULE > > +COCCI_SOURCES = $(filter-out sha1collisiondetection/%,$(C_SOURCES)) > > +else > > +COCCI_SOURCES = $(filter-out sha1dc/%,$(C_SOURCES)) > > +endif > > Can't you just filter out both of these unconditionally without > worrying about DC_SHA1_SUBMODULE?
I'm not sure what you mean by that. Like this perhaps?
COCCI_SOURCES = $(filter-out sha1collisiondetection/%,$(filter-out sha1dc/%,$(C_SOURCES)))
While it's only a single line, I don't think it's any easier on the eyes.