From 213d0aacda424ae3696a4ea661f95d180a3f2840 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 9 Sep 2020 17:14:03 -0300 Subject: [PATCH] Fixed the --warnings_as_errors output. 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. --- src/eeschema_do | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eeschema_do b/src/eeschema_do index 0f8d4ac..85a1b84 100755 --- a/src/eeschema_do +++ b/src/eeschema_do @@ -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: @@ -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)