blob: dda954192ff48659981f139911c0adf7339bade0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
# build-aux/lint-unknown - Lint checks for unknown files
#
# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
RED=$(tput setaf 1)
RESET=$(tput sgr0)
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
|