diff options
| author | Joel Challis <git@zvecr.com> | 2025-04-21 20:07:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-21 20:07:05 +0100 |
| commit | ec324af22eddff1f89f33a30c77a678b111c420c (patch) | |
| tree | 6ccd8a9ef9292868cd503d56f499e51a7c179a2c /lib/python | |
| parent | 2c54ff3e63062e432b5f1b6d01789e565e227336 (diff) | |
Add lint warning for empty url (#25182)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/qmk/cli/lint.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py index bc14b61e8b..e2c76e4465 100644 --- a/lib/python/qmk/cli/lint.py +++ b/lib/python/qmk/cli/lint.py | |||
| @@ -171,6 +171,14 @@ def _handle_invalid_features(kb, info): | |||
| 171 | return ok | 171 | return ok |
| 172 | 172 | ||
| 173 | 173 | ||
| 174 | def _handle_invalid_config(kb, info): | ||
| 175 | """Check for invalid keyboard level config | ||
| 176 | """ | ||
| 177 | if info.get('url') == "": | ||
| 178 | cli.log.warning(f'{kb}: Invalid keyboard level config detected - Optional field "url" should not be empty.') | ||
| 179 | return True | ||
| 180 | |||
| 181 | |||
| 174 | def _chibios_conf_includenext_check(target): | 182 | def _chibios_conf_includenext_check(target): |
| 175 | """Check the ChibiOS conf.h for the correct inclusion of the next conf.h | 183 | """Check the ChibiOS conf.h for the correct inclusion of the next conf.h |
| 176 | """ | 184 | """ |
| @@ -255,6 +263,9 @@ def keyboard_check(kb): # noqa C901 | |||
| 255 | if not _handle_invalid_features(kb, kb_info): | 263 | if not _handle_invalid_features(kb, kb_info): |
| 256 | ok = False | 264 | ok = False |
| 257 | 265 | ||
| 266 | if not _handle_invalid_config(kb, kb_info): | ||
| 267 | ok = False | ||
| 268 | |||
| 258 | invalid_files = git_get_ignored_files(f'keyboards/{kb}/') | 269 | invalid_files = git_get_ignored_files(f'keyboards/{kb}/') |
| 259 | for file in invalid_files: | 270 | for file in invalid_files: |
| 260 | if 'keymap' in file: | 271 | if 'keymap' in file: |
