From: Paul Chaignon <paul@cilium.io>
To: cocci@systeme.lip6.fr
Subject: [Cocci] Exit with non-zero status
Date: Wed, 29 Apr 2020 16:39:28 +0200 [thread overview]
Message-ID: <20200429143926.GA24738@Mem> (raw)
Hi everyone,
I am trying to exit spatch with a non-zero exit status when required
changes have been found. I have tried to add a rule with finalize:python
and the following code:
@finalize:python@
@@
exit(cnt)
where cnt is incremented by another Python rule everytime a required
change is found. This works as expected except for the --in-place option
which becomes ineffective.
Is this a bug, or is finalize:python not intended to be used in that
manner? Is it possible to overwrite spatch's exit status?
Thanks,
Paul
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next reply other threads:[~2020-04-29 15:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 14:39 Paul Chaignon [this message]
2020-04-29 15:07 ` [Cocci] Exit with non-zero status Julia Lawall
2020-04-29 15:16 ` Paul Chaignon
2020-04-29 15:25 ` Julia Lawall
-- strict thread matches above, loose matches on Subject: below --
2020-04-29 18:40 Markus Elfring
2020-04-29 19:07 ` Paul Chaignon
2020-04-29 19:50 ` Markus Elfring
2020-05-05 9:59 ` Paul Chaignon
2020-05-05 11:08 ` Markus Elfring
2020-05-06 12:01 ` Paul Chaignon
2020-05-06 12:24 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429143926.GA24738@Mem \
--to=paul@cilium.io \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.