forked from mirrors/qmk_userspace
New command: qmk lint (#10761)
* Basic qmk lint command * check for keymap readme * change the workflow from qmk info to qmk lint * add a strict mode * parsing -> parse * document qmk lint * small info logging cleanup * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * honor --strict in more places * change the job name to lint Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
7ce5402417
commit
4d33d72975
7 changed files with 153 additions and 24 deletions
|
@ -6,7 +6,7 @@ on:
|
|||
- 'keyboards/**'
|
||||
|
||||
jobs:
|
||||
info:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
|
@ -27,7 +27,7 @@ jobs:
|
|||
echo ${{ github.event.pull_request.base.sha }}
|
||||
echo '${{ steps.file_changes.outputs.files}}'
|
||||
|
||||
- name: Run qmk info
|
||||
- name: Run qmk lint
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}')
|
||||
|
@ -45,10 +45,7 @@ jobs:
|
|||
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
||||
echo "linting ${KB}"
|
||||
|
||||
# TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines
|
||||
qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$
|
||||
!(grep -cq ☒ /tmp/$$)
|
||||
: $((exit_code = $exit_code + $?))
|
||||
qmk lint --keyboard ${KB}
|
||||
fi
|
||||
done
|
||||
exit $exit_code
|
Loading…
Add table
Add a link
Reference in a new issue