From e87108bc8eda4c99a5b828d396902d0da4e21ee3 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sat, 31 May 2025 06:01:51 -0600 Subject: lint-src: Check that the shebang matches .editorconfig --- build-aux/lint-src | 3 +++ 1 file changed, 3 insertions(+) (limited to 'build-aux/lint-src') 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' -- cgit v1.2.3-2-g168b