src/ShellCheck/Analytics.hs: suggest using a shell directive for SC2148
This commit is contained in:
parent
9b66bc2f13
commit
741d499b3d
|
@ -559,7 +559,7 @@ checkShebang params (T_Annotation _ list t) =
|
||||||
checkShebang params (T_Script _ (T_Literal id sb) _) = execWriter $ do
|
checkShebang params (T_Script _ (T_Literal id sb) _) = execWriter $ do
|
||||||
unless (shellTypeSpecified params) $ do
|
unless (shellTypeSpecified params) $ do
|
||||||
when (null sb) $
|
when (null sb) $
|
||||||
err id 2148 "Tips depend on target shell and yours is unknown. Add a shebang."
|
err id 2148 "Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive."
|
||||||
when (executableFromShebang sb == "ash") $
|
when (executableFromShebang sb == "ash") $
|
||||||
warn id 2187 "Ash scripts will be checked as Dash. Add '# shellcheck shell=dash' to silence."
|
warn id 2187 "Ash scripts will be checked as Dash. Add '# shellcheck shell=dash' to silence."
|
||||||
unless (null sb) $ do
|
unless (null sb) $ do
|
||||||
|
|
Loading…
Reference in New Issue