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

15
scripts/lint/util.sh Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
passed() {
echo -e "\x1B[32mPASSED\x1B[0m"
}
skipped() {
local reason=$1
echo -e "\x1B[33mSKIPPED\x1B[0m ($reason)"
}
failed() {
echo -e "\x1B[31mFAILED\x1B[0m"
}