scripts: Rewrite lint scripts

Rewrite lint scripts to report what they do and if they pass. In the
case they fail list the files that caused the failure, except for
clang-format, which will be slow to run of every file individually
(should just run `make fmt` anyway). Also add a script to run all the
lints in order with a single command.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-01-09 10:38:48 -07:00
committed by Jeremy Soller
parent b03c960b4f
commit 1aadc68257
8 changed files with 127 additions and 51 deletions

View File

@ -8,15 +8,13 @@ jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Check SPDX identifiers
run: ./scripts/lint/spdx.sh
- name: Check indentation
run: ./scripts/lint/indent.sh
- uses: actions/checkout@v3
- name: Check SPDX tags
run: ./scripts/lint/01-spdx-tags.sh
- name: Check formatting
run: ./scripts/clang-format.sh
continue-on-error: true
run: ./scripts/lint/02-clang-format.sh
tool:
strategy:
@ -27,7 +25,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: ./scripts/deps.sh
@ -90,7 +88,7 @@ jobs:
board: oryp9
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install dependencies
run: ./scripts/deps.sh