We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parentsda190f1 +c04ed21 commit9d938e6Copy full SHA for 9d938e6
src/ShellCheck/Checker.hs
@@ -55,7 +55,8 @@ shellFromFilename filename = listToMaybe candidates
55
shellExtensions= [(".ksh",Ksh)
56
,(".bash",Bash)
57
,(".bats",Bash)
58
- ,(".dash",Dash)]
+ ,(".dash",Dash)
59
+ ,(".envrc",Bash)]
60
-- The `.sh` is too generic to determine the shell:
61
-- We fallback to Bash in this case and emit SC2148 if there is no shebang
62
candidates=
@@ -308,6 +309,13 @@ prop_deducesTypeFromExtension2 = result == [2079]
308
309
csScript="(( 3.14 ))"
310
}
311
312
+prop_deducesTypeFromEnvrcExtension= result== [2079]
313
+where
314
+ result= checkWithSpec[] emptyCheckSpec {
315
+ csFilename=".envrc",
316
+ csScript="(( 3.14 ))"
317
+ }
318
+
319
prop_canDisableShebangWarning=null$ result
320
where
321
result= checkWithSpec[] emptyCheckSpec {