Skip to content

Commit

Permalink
consistency_checks.py: Output error data
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Jun 23, 2023
1 parent 8bc6072 commit 68fc47a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions consistency_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def _error_stats(self):

def _skip_errors(self, stats):
"""Skip any known errors"""
print(stats["missing"] > 0, stats["missing"] is self.check_missing_fields)
print(stats["duplicate"] > 0, stats["duplicate"] is self.check_statement_dups)
print(stats["reference"] > 0, stats["reference"] is self.check_statement_refs)
if stats["missing"] > 0 and not stats["missing"] is self.check_missing_fields:
return False
elif stats["duplicate"] > 0 and not stats["duplicate"] is self.check_statement_dups:
Expand All @@ -208,6 +211,7 @@ def _process_errors(self):
output_text(self.console, f"{len(self.error_log)} errors: truncated at {self.error_limit}", "red")
if len(self.error_log) > 0:
stats = self._error_stats()
print(stats)
if not self._skip_errors(stats):
estats = []
for e in stats:
Expand Down

0 comments on commit 68fc47a

Please sign in to comment.