Skip to content

Commit

Permalink
Fixed the --warnings_as_errors output.
Browse files Browse the repository at this point in the history
As @ottojo points in #1 this option counted warnings as errors, but
never printed the warnings.
Now the code does what the option says: warnings are converted to
errors. Not just counted as errors, but also printed as errors.
I think this is more coherent with the name of the option.
  • Loading branch information
set-soft committed Sep 9, 2020
1 parent b78afa6 commit 213d0aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/eeschema_do
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ def eeschema_parse_erc(erc_file, warning_as_error=False):

cont = False
is_err = False
global errs
global wrns
for line in lines:
m = re.search(r'^ErrType\((\d+)\): (.*)', line)
if m:
Expand Down Expand Up @@ -246,6 +248,8 @@ def eeschema_parse_erc(erc_file, warning_as_error=False):
warnings = m.group(3)

if warning_as_error:
errs += wrns
wrns = []
return int(errors) + int(warnings), 0
return int(errors), int(warnings)

Expand Down

0 comments on commit 213d0aa

Please sign in to comment.