File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
* .sh text eol =lf
2
2
* .bash text eol =lf
3
+ * .bats text eol =lf
3
4
4
5
# Docs allow trailing whitespaces
5
6
* .md whitespace =-blank-at-eol
Original file line number Diff line number Diff line change 19
19
hooks :
20
20
- id : git-check # Configure in .gitattributes
21
21
- id : shellcheck
22
- exclude : " .bats$"
23
22
- id : shfmt
24
23
exclude : " .bats$"
25
24
- repo : https://github.com/Lucas-C/pre-commit-hooks
@@ -38,10 +37,9 @@ repos:
38
37
types : [file]
39
38
- id : dot-bash
40
39
name : Check .bash files against bash-it requirements
41
- exclude : " test/test_helper.bash"
42
40
entry : ./hooks/dot-bash.sh
43
41
language : system
44
- files : " \\ .bash $"
42
+ files : " \\ .ba[ts][sh] $"
45
43
types : [file]
46
44
- id : clean-files-txt
47
45
name : Check that clean_files.txt is sorted alphabetically.
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ for file in "$@"; do
12
12
# Confirm expected schellcheck header
13
13
#
14
14
LINE1=" $( head -n 1 " ${file} " ) "
15
- if [[ " ${LINE1} " != " # shellcheck shell=bash" ]]; then
15
+ SCSH=" ${file##* .} "
16
+ if [[ " ${LINE1} " != " # shellcheck shell=${SCSH} " ]]; then
16
17
echo " Bash include file \` ${file} \` has bad/missing shellcheck header"
17
18
exit_code=1
18
19
fi
You can’t perform that action at this time.
0 commit comments