mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-06-03 14:13:46 -03:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -56,6 +56,7 @@ safe_commands = [
|
||||
|
||||
subcommands = [
|
||||
'qmk.cli.ci.validate_aliases',
|
||||
'qmk.cli.ci.validate_keyboard_targets',
|
||||
'qmk.cli.bux',
|
||||
'qmk.cli.c2json',
|
||||
'qmk.cli.cd',
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
"""Validates the list of keyboard targets.
|
||||
"""
|
||||
from milc import cli
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@cli.subcommand('Validates the list of keyboard targets.', hidden=True)
|
||||
def ci_validate_keyboard_targets(cli):
|
||||
errors = set()
|
||||
|
||||
for rules_mk in Path('keyboards').glob('**/rules.mk'):
|
||||
if any({'keymaps', 'common', 'lib'} & set(rules_mk.parts)):
|
||||
continue
|
||||
|
||||
folder = rules_mk.parent
|
||||
if not any(folder.glob('**/keyboard.json')):
|
||||
errors.add(folder)
|
||||
|
||||
for keymap in Path('keyboards').glob('**/keymaps/'):
|
||||
folder = keymap.parent
|
||||
if not any(folder.glob('**/keyboard.json')):
|
||||
errors.add(folder)
|
||||
|
||||
for error in errors:
|
||||
print(f"{error}::Legacy target detected")
|
||||
|
||||
exit(min(len(errors), 255))
|
||||
Reference in New Issue
Block a user