-
Notifications
You must be signed in to change notification settings - Fork 20
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
panlint: Add option to exit cleanly even if problems are found #159
Conversation
@@ -448,6 +448,7 @@ def main(): | |||
parser.add_argument('--vi', action='store_true', help='Output line numbers in a vi option style') | |||
parser.add_argument('--table', action='store_true', help='Display a table of per-file problem stats') | |||
parser.add_argument('--allow_mvn_templates', action='store_true', help='Allow use of maven templates') | |||
parser.add_argument('--ignore_problems_on_exit', action='store_true', help='Exit cleanly even if problems are found') |
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 would rename it to always_exit_success
, because this is what your code does
@@ -465,7 +466,7 @@ def main(): | |||
|
|||
if not args.paths: | |||
print 'No files were provided, not doing anything' | |||
sys_exit(0) | |||
return 0 |
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.
IMHO this is a (user) error. Since the user ran the tool they wanted an effect, unless they passed --help or -v or something.
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.
See #144
69a982e
to
9d70a3f
Compare
@stdweird thanks for the suggestion — done |
@@ -485,6 +486,9 @@ def main(): | |||
print '%d problems found in total' % problems_found | |||
|
|||
if args.ignore_problems_on_exit: |
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.
you changed the option name, but not the attribute name?
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.
Blargh, rebase.
Some testing frameworks interpret tools exiting with a non-zero code as a failure of the tool rather than the tests it performs, adding this option allows panlint to be used with these tools. (e.g. arcanist).
Some testing frameworks interpret tools exiting with a non-zero code as a
failure of the tool rather than the tests it performs, adding this option
allows panlint to be used with these tools. (e.g. arcanist).