diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-31 06:01:51 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-31 11:48:23 -0600 |
commit | e87108bc8eda4c99a5b828d396902d0da4e21ee3 (patch) | |
tree | bc0dfb073667086d67faef3e1d0e55062287e188 | |
parent | 74e15568de208c0d734e816e30eed8d95c3d08e0 (diff) |
lint-src: Check that the shebang matches .editorconfig
-rwxr-xr-x | build-aux/lint-src | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/build-aux/lint-src b/build-aux/lint-src index 4207bad..033340d 100755 --- a/build-aux/lint-src +++ b/build-aux/lint-src @@ -61,6 +61,9 @@ get-dscname() { '#!/usr/bin/env python3') : ;; *) err "$filename" 'has an unrecognized shebang' ;; esac + if [[ -n $shebang && $shebang != */"$filetype" && $shebang != *' '"$filetype" ]]; then + err "$filename" "wrong shebang for $filetype" + fi if ! grep -E -q 'Copyright \(C\) 202[4-9]((-|, )202[5-9])* Luke T. Shumaker' "$filename"; then err "$filename" 'is missing a copyright statement' |