Skip to content
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: Provide print summary option #268

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion panc/src/main/scripts/panlint/panlint.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ def main():
parser.add_argument('paths', metavar='PATH', type=str, nargs='*', help='Paths of files to check')
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('--summary', action='store_true', help='Display a summary of problems')
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')
Expand Down Expand Up @@ -571,7 +572,9 @@ def main():
print('\nProblem count per file:')
print(filestats_table(problem_stats))

print('\n%d problems found in %d lines' % (problem_count, len(problem_lines)))
if args.summary:
print()
print(f"\n{problem_count} problems found in {len(problem_lines)} lines")

if args.always_exit_success:
return 0
Expand Down
Loading