-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return non-zero error codes from SANY on more errors #483
Conversation
This is intended as useful when using SANY as part of shell-based tooling. The command line flag is introduced to keep it backwards compatible so that no one breaks.
@@ -77,6 +77,10 @@ | |||
// true <=> statistics about builtin operator usage | |||
// should be reported | |||
|
|||
private static boolean strictErrorCodes = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the rest: Please rename to doStrictErrorCodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -410,6 +418,8 @@ else if (args[i].equals("-D") || args[i].equals("-d")) | |||
doDebugging = !doDebugging; | |||
else if (args[i].equals("-STAT") || args[i].equals("-stat")) | |||
doStats = !doStats; | |||
else if (args[i].equals("-error-codes")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to call toLowerCase
on args[i]
to ignore casing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -77,6 +77,10 @@ | |||
// true <=> statistics about builtin operator usage | |||
// should be reported | |||
|
|||
private static boolean strictErrorCodes = false; | |||
// true <=> error level should be reported as the tools' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump SANY's version number and moddate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I believe you meant the constants towards the top of the file. Let me know if I misunderstood.
Thanks for the review! Made changes as requested, please take a look |
This is intended as useful when using SANY as part of shell-based
tooling. The command line flag is introduced to keep it backwards
compatible so that no one breaks.