mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 13:40:54 +08:00
src/ShellCheck/Analytics.hs: suggest using a shell directive for SC2148
This commit is contained in:
@@ -559,7 +559,7 @@ checkShebang params (T_Annotation _ list t) =
|
||||
checkShebang params (T_Script _ (T_Literal id sb) _) = execWriter $ do
|
||||
unless (shellTypeSpecified params) $ do
|
||||
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") $
|
||||
warn id 2187 "Ash scripts will be checked as Dash. Add '# shellcheck shell=dash' to silence."
|
||||
unless (null sb) $ do
|
||||
|
Reference in New Issue
Block a user