Skip to content

Commit

Permalink
feat: add to show warnings when no errors is reported (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiumXp committed Nov 23, 2023
1 parent 8b11426 commit b993d4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions norminette/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def run(self, context, source):
print("uncaught ->", unrecognized_tkns)
if context.errors == []:
print(context.filename + ": OK!")
for warning in sorted(context.warnings, key=cmp_to_key(sort_errs)):
print(warning)
else:
print(context.filename + ": Error!")
context.errors = sorted(
Expand Down
1 change: 1 addition & 0 deletions tests/rules/samples/test_file_1012_3.out
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@
test_file_1012_3.h - IsPreprocessorStatement In "GlobalScope" from "None" line 78":
<HASH> <IDENTIFIER=endif>
test_file_1012_3.h: OK!
Notice: GLOBAL_VAR_DETECTED (line: 18, col: 1): Global variable present in file. Make sure it is a reasonable choice.

0 comments on commit b993d4f

Please sign in to comment.