Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d938e6

Browse files
authored
Merge pull request#3353 from shikanime/pr3353
Fix envrc false positive
2 parentsda190f1 +c04ed21 commit9d938e6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/ShellCheck/Checker.hs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ shellFromFilename filename = listToMaybe candidates
5555
shellExtensions= [(".ksh",Ksh)
5656
,(".bash",Bash)
5757
,(".bats",Bash)
58-
,(".dash",Dash)]
58+
,(".dash",Dash)
59+
,(".envrc",Bash)]
5960
-- The `.sh` is too generic to determine the shell:
6061
-- We fallback to Bash in this case and emit SC2148 if there is no shebang
6162
candidates=
@@ -308,6 +309,13 @@ prop_deducesTypeFromExtension2 = result == [2079]
308309
csScript="(( 3.14 ))"
309310
}
310311

312+
prop_deducesTypeFromEnvrcExtension= result== [2079]
313+
where
314+
result= checkWithSpec[] emptyCheckSpec {
315+
csFilename=".envrc",
316+
csScript="(( 3.14 ))"
317+
}
318+
311319
prop_canDisableShebangWarning=null$ result
312320
where
313321
result= checkWithSpec[] emptyCheckSpec {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp