Cocci.exit is for the case where you want to abandon work on a single file,
eg because you are working on a whole directory, but find that a given file
of that directory is not promising.

Does your programming interface provide any means for the script execution environments to distinguish these use case?


If there is a good name for the case of stopping work on a single file
and another good name for stopping coccinelle completely with an exit code,
then I can make the change. But the latter functionality seems less useful
than the former.

Would you like to distinguish between the skipping of an input file and the abort of an source code analysis process?


The only obvious case I can see where the latter functionality would be useful
is when you use spatch with the -sp option, to have the effect of an advanced
grep. But then you can only specify a matching rule, there is no opportunity to
write script code that might call an exit function.

I find it a good practice generally to set the program exit status to an appropriate value. I hope that a corresponding enumeration of error codes and categories can be clarified.
http://stackoverflow.com/questions/5774773/exit-status-on-incorrect-usage
http://stackoverflow.com/questions/2820285/abort-terminate-or-exit

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to