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>
15 lines
308 B
Bash
Executable File
15 lines
308 B
Bash
Executable File
#!/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
|