On Wed, Apr 29, 2020 at 09:50:21PM +0200, Markus Elfring wrote:
> >> I suggest to handle the desired search result counter
> >> by an other data processing interface.
> >> How would you like to treat program execution failures otherwise?
> >
> > I'm trying to run SmPL programs as part of a CI pipeline, so execution
> > failure and (buggy) code pattern not found really mean the same in
> > the end: a human needs to take a look :-)
> 
> I imagine that such a look can occasionally made a bit more convenient.
> 
> 
> > I understand that is not a common use case
> 
> Can such a software application become more popular?

As far as I understand, if it's not more popular to use Coccinelle in
CIs right now it's because of (1) false positives for some rules, and
(2) the little reliance of the Linux community on CIs.

We rely heavily on CI and probably wouldn't use Coccinelle in the long
term if we couldn't enable it in CI. Without CI, developers and
reviewers would likely forget to execute semantic patches.

So CI use seems to become more popular (even in low-level projects), but
it's not like this exit status issue is a blocker to use Coccinelle in
CI. For the record, I enabled Coccinelle in our CI (GitHub Actions)
yesterday and worked around that issue with the following script:

  make -C bpf/ coccicheck | tee /tmp/stdout
  exit $(grep -c "[prefix of warning messages]" /tmp/stdout)

> 
> 
> > and I'm fine using a workaround.
> 
> We have got different views around preferable solutions.
> How many information would you like to put into an exit code so far?

Please see above script. I currently exit with number of failures, but
having just 0 (success) and 1 (fail) statuses would be enough.

> 
> 
> > Just wanted to check I wasn't missing something obvious.
> 
> Further possibilities should probably be clarified further,
> shouldn't they?
> 
> Will the usage of additional data structures become more interesting?

Not sure I understand the question. What data structures?

Cheers,
Paul
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to