git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/5] coccinelle: exclude sha1dc source files from static analysis

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 23, 2018, 18:57 UTC
Message-ID
<CAPig+cQM-hdXXe6uZ768HbJ5T5QqJNKo9kuz6F=i7D+9Q-M90Q@mail.gmail.com>
In-Reply-To
<CAM0VKjkJoqRFmXdnuujSaiZ=hvz6MeAmgoUQNAkZ+82ZrKtotw@mail.gmail.com>
On Mon, Jul 23, 2018 at 2:44 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 18 quoted lines
> On Mon, Jul 23, 2018 at 8:28 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > On Mon, Jul 23, 2018 at 9:51 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> > > +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.

I wasn't worried about readability or one or two lines (indeed, you could still do the filtering over two statements).

What I meant was that sha1dc/ contains files whether DC_SHA1_SUBMODULE is defined or not. If the idea of this change is that there's no point in having Coccinelle check those foreign, imported files (and waste time in the process), then I was thinking that you'd want to omit sha1dc/* regardless of whether DC_SHA1_SUBMODULE is defined.

Looking more closely at the Makefile, however, I see that C_SOURCES holds only one or the other of sha1dc/* or sha1collisiondetection/lib/*, so my concern is unfounded, which explains why my question confused you.

Previous: SZEDER GáborNext: SZEDER Gábor
Message 10 of 31 in “Misc Coccinelle-related improvements”
  1. 0/5 Misc Coccinelle-related improvementsSZEDER Gábor, Jul 23, 2018
  2. 1/5 coccinelle: mark the 'coccicheck' make target as .PHONYSZEDER Gábor, Jul 23, 2018
  3. Derrick StoleeJul 23, 2018
  4. Junio C HamanoJul 23, 2018
  5. 2/5 coccinelle: use $(addsuffix) in 'coccicheck' make targetSZEDER Gábor, Jul 23, 2018
  6. Junio C HamanoJul 23, 2018
  7. 3/5 coccinelle: exclude sha1dc source files from static analysisSZEDER Gábor, Jul 23, 2018
  8. Eric SunshineJul 23, 2018
  9. SZEDER GáborJul 23, 2018
  10. Eric SunshineJul 23, 2018
  11. 4/5 coccinelle: put sane filenames into output patchesSZEDER Gábor, Jul 23, 2018
  12. Derrick StoleeJul 23, 2018
  13. 5/5 coccinelle: extract dedicated make target to clean Coccinelle's resultsSZEDER Gábor, Jul 23, 2018
  14. Derrick StoleeJul 23, 2018
  15. Duy NguyenJul 23, 2018
  16. René ScharfeJul 23, 2018
  17. Junio C HamanoJul 23, 2018
  18. [PoC] coccinelle: make Coccinelle-related make targets more fine-grainedSZEDER Gábor, Aug 2, 2018
  19. René ScharfeAug 2, 2018
  20. Jeff KingAug 2, 2018
  21. Jeff KingAug 2, 2018
  22. Jonathan NiederAug 3, 2018
  23. Jeff KingAug 3, 2018
  24. Jonathan NiederAug 5, 2018
  25. Eric SunshineAug 2, 2018
  26. Jeff KingAug 2, 2018
  27. Ævar Arnfjörð BjarmasonAug 2, 2018
  28. Julia LawallAug 3, 2018
  29. Jonathan NiederAug 3, 2018
  30. Julia LawallAug 3, 2018
  31. Julia LawallAug 3, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.