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:
committed by
Jeremy Soller
parent
b03c960b4f
commit
1aadc68257
14
scripts/lint/lint.sh
Executable file
14
scripts/lint/lint.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
# Run all lints.
|
||||
|
||||
LINT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
|
||||
LINTS=$(find "$LINT_DIR" -type f -name "[0-9][0-9]-*" | sort)
|
||||
FAILED=0
|
||||
|
||||
for lint in $LINTS; do
|
||||
$lint || FAILED=1
|
||||
done
|
||||
|
||||
[[ "$FAILED" = "0" ]] || exit 1
|
Reference in New Issue
Block a user