diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-02 16:47:00 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-06-02 16:47:00 -0600 |
commit | ce8ae41d677875adb45d99c351bcba108fb82a44 (patch) | |
tree | 45d54aca9fd5a4bb67ad55e50b71eaa6713894c0 /build-aux/lint-h | |
parent | 6a6e3083d2d60cbd5bd581f432a0c56eff2bf29e (diff) | |
parent | 559627b00b74e11e394589bfcc8864b0f22d7e1b (diff) |
Merge branch 'lukeshu/better-cpp'
Diffstat (limited to 'build-aux/lint-h')
-rwxr-xr-x | build-aux/lint-h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/build-aux/lint-h b/build-aux/lint-h deleted file mode 100755 index 7459032..0000000 --- a/build-aux/lint-h +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# build-aux/lint-h - Lint checks for C header 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 - dscname=$(./build-aux/get-dscname "$filename") - guard=${dscname//'/'/'_'} - guard=${guard//'.'/'_'} - guard="_${guard^^}_" - if ! { grep -Fxq "#ifndef ${guard}" "$filename" && - grep -Fxq "#define ${guard}" "$filename" && - grep -Fxq "#endif /* ${guard} */" "$filename"; }; then - err "$filename" "does not have ${guard} guard" - fi -done -exit $r |