summaryrefslogtreecommitdiff
path: root/build-aux/lint-unknown
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-22 19:17:02 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-22 19:17:02 -0600
commit185c3329145959433b8b805de5f114b66b8fcaee (patch)
tree048ec8b781f1d3b45d29a1d862d724908d0d9785 /build-aux/lint-unknown
parent2774e918b6ced670f80036532052189d568e5c5c (diff)
parent2300ddae5f98180311419413d98fbc8384470665 (diff)
Merge branch 'lukeshu/qa'
Diffstat (limited to 'build-aux/lint-unknown')
-rwxr-xr-xbuild-aux/lint-unknown16
1 files changed, 15 insertions, 1 deletions
diff --git a/build-aux/lint-unknown b/build-aux/lint-unknown
index 3c2e91b..dda9541 100755
--- a/build-aux/lint-unknown
+++ b/build-aux/lint-unknown
@@ -7,4 +7,18 @@
RED=$(tput setaf 1)
RESET=$(tput sgr0)
-printf "${RED}%s${RESET}: cannot lint unknown file type\n" "$@" >&2
+err() {
+ printf "${RED}%s${RESET}: %s\n" "$1" "$2" >&2
+ r=1
+}
+
+r=0
+for filename in "$@"; do
+ if ! { [ -f "$filename" ] && ! [ -h "$filename" ]; }; then
+ # Ignore non-files
+ continue
+ fi
+
+ err "$filename" 'cannot lint unknown file type'
+done
+exit $r