Skip to content

Commit 62ed265

Browse files
committed
[Warnings] 3 warnings promoted to silly when running on CI/CD
- W008 Unable to find KiCad configuration file - W058 Missing KiCad main config file - W058 Missing default system table
1 parent cd51d87 commit 62ed265

4 files changed

Lines changed: 31 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5252
output that generates the CSV first, it gets generated on-the-fly
5353
- Report: the outputs that generates images no longer needs to be already
5454
executed, KiBot will run them
55-
55+
- Promoted to "silly" warnings when we are on CI/CD:
56+
- W008 Unable to find KiCad configuration file
57+
- W058 Missing KiCad main config file
58+
- W058 Missing default system table
5659

5760
## [1.9.0] - 2026-05-12
5861
### Added

docs/source/Changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ Changed
9393
on-the-fly
9494
- Report: the outputs that generates images no longer needs to be
9595
already executed, KiBot will run them
96+
- Promoted to “silly” warnings when we are on CI/CD:
97+
98+
- W008 Unable to find KiCad configuration file
99+
- W058 Missing KiCad main config file
100+
- W058 Missing default system table
96101

97102
[1.9.0] - 2026-05-12
98103
--------------------

kibot/kicad/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@ def find_kicad_common():
213213
cfg += '.json'
214214
if os.path.isfile(cfg):
215215
return cfg
216-
logger.warning(W_NOCONFIG + 'Unable to find KiCad configuration file ({})'.format(cfg))
216+
msg = W_NOCONFIG+f'Unable to find KiCad configuration file `{cfg}`'
217+
if GS.ci_cd_detected:
218+
msg = W_SILLY+msg
219+
logger.warning(msg)
217220
return None
218221

219222
def _guess_kicad_data_dir(data_dir):

kibot/kiplot.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ def load_actions(progress=None):
119119
activate.deactivate()
120120

121121

122+
def filter_warning(text):
123+
if not GS.ci_cd_detected:
124+
return False
125+
if 'Missing KiCad main config file' in text:
126+
return True
127+
if 'Missing default system table' in text:
128+
return True
129+
return False
130+
131+
122132
def extract_errors(text):
123133
in_error = in_warning = False
124134
msg = ''
@@ -132,7 +142,10 @@ def extract_errors(text):
132142
logger.error(msg.rstrip())
133143
elif in_warning:
134144
in_warning = False
135-
logger.warning(W_KIAUTO+msg.rstrip())
145+
msg = W_KIAUTO+msg.rstrip()
146+
if filter_warning(msg):
147+
msg = W_SILLY+msg
148+
logger.warning(msg)
136149
if line.startswith('ERROR:'):
137150
in_error = True
138151
msg = line[6:]
@@ -144,7 +157,10 @@ def extract_errors(text):
144157
logger.error(msg.rstrip())
145158
elif in_warning:
146159
in_warning = False
147-
logger.warning(W_KIAUTO+msg.rstrip())
160+
msg = W_KIAUTO+msg.rstrip()
161+
if filter_warning(msg):
162+
msg = W_SILLY+msg
163+
logger.warning(msg)
148164

149165

150166
def debug_output(res):

0 commit comments

Comments
 (0)