src/ShellCheck/Analytics.hs: suggest using a shell directive for SC2148

This commit is contained in:
Austin English 2020-03-07 19:23:35 -06:00
parent 9b66bc2f13
commit 741d499b3d
1 changed files with 1 additions and 1 deletions

View File

@ -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