diff options
author | Zach White <skullydazed@gmail.com> | 2021-08-10 07:48:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 07:48:22 -0700 |
commit | ed84a4e7e3e65d1ef090117cdb9c6d70ed554a28 (patch) | |
tree | 78a620cbf35c2e4760fcab54fdc8067b652880c9 | |
parent | 9a0118c603e8a773ca468c2382204e475e5bf7d4 (diff) | |
download | qmk_firmware-ed84a4e7e3e65d1ef090117cdb9c6d70ed554a28.tar.gz qmk_firmware-ed84a4e7e3e65d1ef090117cdb9c6d70ed554a28.zip |
Improve the qmk lint readme check (#13941)
* improve lint readme check
* improve if
-rw-r--r-- | lib/python/qmk/cli/lint.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py index a164dba632..02b31fbc41 100644 --- a/lib/python/qmk/cli/lint.py +++ b/lib/python/qmk/cli/lint.py @@ -4,7 +4,7 @@ from milc import cli from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json -from qmk.keyboard import keyboard_completer +from qmk.keyboard import find_readme, keyboard_completer from qmk.keymap import locate_keymap from qmk.path import is_keyboard, keyboard @@ -31,7 +31,8 @@ def lint(cli): ok = True keyboard_path = keyboard(cli.config.lint.keyboard) keyboard_info = info_json(cli.config.lint.keyboard) - readme_path = keyboard_path / 'readme.md' + readme_path = find_readme(cli.config.lint.keyboard) + missing_readme_path = keyboard_path / 'readme.md' # Check for errors in the info.json if keyboard_info['parse_errors']: @@ -43,9 +44,9 @@ def lint(cli): cli.log.error('Warnings found when generating info.json (Strict mode enabled.)') # Check for a readme.md and warn if it doesn't exist - if not readme_path.exists(): + if not readme_path: ok = False - cli.log.error('Missing %s', readme_path) + cli.log.error('Missing %s', missing_readme_path) # Keymap specific checks if cli.config.lint.keymap: |