Skip to content

Commit

Permalink
Merge pull request #159 from jrha/panlint
Browse files Browse the repository at this point in the history
panlint: Add option to exit cleanly even if problems are found
  • Loading branch information
stdweird authored Jul 25, 2017
2 parents b9334c9 + ff9e04a commit 1a02b66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion panc/src/main/scripts/panlint/panlint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('--always_exit_success', action='store_true', help='Always exit cleanly even if problems are found')
group_output = parser.add_mutually_exclusive_group()
group_output.add_argument('--debug', action='store_true', help='Enable debug output')
group_output.add_argument('--ide', action='store_true', help='Output machine-readable results for use by IDEs')
Expand All @@ -465,7 +466,7 @@ def main():

if not args.paths:
print 'No files were provided, not doing anything'
sys_exit(0)
return 0

for path in args.paths:
for filename in glob(path):
Expand All @@ -485,6 +486,9 @@ def main():
print
print '%d problems found in total' % problems_found

if args.always_exit_success:
return 0

if problems_found:
return 1

Expand Down

0 comments on commit 1a02b66

Please sign in to comment.