diff options
| author | Zach White <skullydazed@gmail.com> | 2020-11-07 09:56:08 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-07 09:56:08 -0800 |
| commit | 4d33d72975f2d63c7b6ff6fd4aa7e0f4c4347583 (patch) | |
| tree | afc9f0ebeeefed8405443cbe8636458d6c4c18d2 /.github | |
| parent | 7ce5402417b0332569bf48cf2c51e412cd35a18a (diff) | |
| download | qmk_firmware-4d33d72975f2d63c7b6ff6fd4aa7e0f4c4347583.tar.gz qmk_firmware-4d33d72975f2d63c7b6ff6fd4aa7e0f4c4347583.zip | |
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>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/lint.yml (renamed from .github/workflows/info.yml) | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/.github/workflows/info.yml b/.github/workflows/lint.yml index bb3a50847..1aa347a1b 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/lint.yml | |||
| @@ -6,7 +6,7 @@ on: | |||
| 6 | - 'keyboards/**' | 6 | - 'keyboards/**' |
| 7 | 7 | ||
| 8 | jobs: | 8 | jobs: |
| 9 | info: | 9 | lint: |
| 10 | runs-on: ubuntu-latest | 10 | runs-on: ubuntu-latest |
| 11 | 11 | ||
| 12 | container: qmkfm/base_container | 12 | container: qmkfm/base_container |
| @@ -27,7 +27,7 @@ jobs: | |||
| 27 | echo ${{ github.event.pull_request.base.sha }} | 27 | echo ${{ github.event.pull_request.base.sha }} |
| 28 | echo '${{ steps.file_changes.outputs.files}}' | 28 | echo '${{ steps.file_changes.outputs.files}}' |
| 29 | 29 | ||
| 30 | - name: Run qmk info | 30 | - name: Run qmk lint |
| 31 | shell: 'bash {0}' | 31 | shell: 'bash {0}' |
| 32 | run: | | 32 | run: | |
| 33 | QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') | 33 | QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') |
| @@ -45,10 +45,7 @@ jobs: | |||
| 45 | if [[ $KEYMAP_ONLY -gt 0 ]]; then | 45 | if [[ $KEYMAP_ONLY -gt 0 ]]; then |
| 46 | echo "linting ${KB}" | 46 | echo "linting ${KB}" |
| 47 | 47 | ||
| 48 | # TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines | 48 | qmk lint --keyboard ${KB} |
| 49 | qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$ | ||
| 50 | !(grep -cq ☒ /tmp/$$) | ||
| 51 | : $((exit_code = $exit_code + $?)) | ||
| 52 | fi | 49 | fi |
| 53 | done | 50 | done |
| 54 | exit $exit_code | 51 | exit $exit_code |
