aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/qmk/cli/lint.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py
index a164dba63..02b31fbc4 100644
--- a/lib/python/qmk/cli/lint.py
+++ b/lib/python/qmk/cli/lint.py
@@ -4,7 +4,7 @@ from milc import cli
4 4
5from qmk.decorators import automagic_keyboard, automagic_keymap 5from qmk.decorators import automagic_keyboard, automagic_keymap
6from qmk.info import info_json 6from qmk.info import info_json
7from qmk.keyboard import keyboard_completer 7from qmk.keyboard import find_readme, keyboard_completer
8from qmk.keymap import locate_keymap 8from qmk.keymap import locate_keymap
9from qmk.path import is_keyboard, keyboard 9from qmk.path import is_keyboard, keyboard
10 10
@@ -31,7 +31,8 @@ def lint(cli):
31 ok = True 31 ok = True
32 keyboard_path = keyboard(cli.config.lint.keyboard) 32 keyboard_path = keyboard(cli.config.lint.keyboard)
33 keyboard_info = info_json(cli.config.lint.keyboard) 33 keyboard_info = info_json(cli.config.lint.keyboard)
34 readme_path = keyboard_path / 'readme.md' 34 readme_path = find_readme(cli.config.lint.keyboard)
35 missing_readme_path = keyboard_path / 'readme.md'
35 36
36 # Check for errors in the info.json 37 # Check for errors in the info.json
37 if keyboard_info['parse_errors']: 38 if keyboard_info['parse_errors']:
@@ -43,9 +44,9 @@ def lint(cli):
43 cli.log.error('Warnings found when generating info.json (Strict mode enabled.)') 44 cli.log.error('Warnings found when generating info.json (Strict mode enabled.)')
44 45
45 # Check for a readme.md and warn if it doesn't exist 46 # Check for a readme.md and warn if it doesn't exist
46 if not readme_path.exists(): 47 if not readme_path:
47 ok = False 48 ok = False
48 cli.log.error('Missing %s', readme_path) 49 cli.log.error('Missing %s', missing_readme_path)
49 50
50 # Keymap specific checks 51 # Keymap specific checks
51 if cli.config.lint.keymap: 52 if cli.config.lint.keymap: