From e52319b751c43c2efb828f5fd1549780c1177962 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 18 Feb 2026 00:06:23 +0000 Subject: [PATCH] Check PRs for invalid keyboard build targets (#25992) --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ec5e04804d..19a19d3538 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,7 +31,7 @@ jobs: with: use_rest_api: true - - name: Print info + - name: Print git info run: | git rev-parse --short HEAD echo ${{ github.event.pull_request.base.sha }} @@ -78,10 +78,37 @@ jobs: fi exit $exit_code - - name: Verify keyboard aliases + - name: Reset git repo if: always() shell: 'bash {0}' run: | git reset --hard git clean -xfd + + - name: Verify keyboard targets + if: always() + shell: 'bash {0}' + run: | + exit_code=0 + + for file in $(find keyboards/ -name rules.mk | grep -v /keymaps/ | grep -v /common/ | grep -v /lib/); do + dir=$(dirname $file) + + $(find $dir -name keyboard.json -exec false {} +) + if [[ $? == 0 ]]; then + echo "$dir::Legacy target detected" + + ((++exit_code)) + fi + done + + if [[ $exit_code -gt 255 ]]; then + exit 255 + fi + exit $exit_code + + - name: Verify keyboard aliases + if: always() + shell: 'bash {0}' + run: | qmk ci-validate-aliases