Skip to content

Commit

Permalink
[xDRC] Added message for don't/stop inconsistency
Browse files Browse the repository at this point in the history
See #637
  • Loading branch information
set-soft committed Jul 3, 2024
1 parent 66f65f0 commit beff175
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kibot/pre_any_xrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from .pre_base import BasePreFlight
from .pre_filters import FilterOptions, FiltersOptions
from .macros import macros, document # noqa: F401
from .log import get_logger
logger = get_logger(__name__)
from . import log
logger = log.get_logger(__name__)
UNITS_2_KICAD = {'millimeters': 'mm', 'inches': 'in', 'mils': 'mils'}


Expand Down Expand Up @@ -315,6 +315,9 @@ def run(self):
# Write it to the output file
with open(output, 'wt') as f:
f.write(res)
# Sanity check
if self._dont_stop and self.c_warn and log.stop_on_warnings:
logger.error("Inconsistent options, asked to don't stop, but also to stop on warnings")
# Report the result
self.report('error', self.c_err, data)
self.report('warning', self.c_warn, data)
Expand Down

0 comments on commit beff175

Please sign in to comment.