From a2b5b6a50030d50da832e9f5c314d48e4746034f Mon Sep 17 00:00:00 2001 From: Onno Zweers Date: Wed, 3 Jun 2020 11:37:53 +0200 Subject: [PATCH] Rephrase: *Shellcheck* can't follow non-constant source The message "Can't follow non-constant source. Use a directive to specify location." set me off on the wrong foot. At first, I thought it meant "In bash, you can't source a script specified by a variable." It was only after reading the wiki page for this message https://github.com/koalaman/shellcheck/wiki/SC1090 that I understood that the problem is that *shellcheck* can't check the sourced file. So I would suggest to rephrase this message so that it is more clear that the problem is in the checking, not in the running of the script. --- src/ShellCheck/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index 7eb2c32..01795ed 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -2129,7 +2129,7 @@ readSource t@(T_Redirecting _ _ (T_SimpleCommand cmdId _ (cmd:file':rest'))) = d case literalFile of Nothing -> do parseNoteAtId (getId file) WarningC 1090 - "Can't follow non-constant source. Use a directive to specify location." + "Shellcheck can't follow non-constant source. Use a directive to specify location." return t Just filename -> do proceed <- shouldFollow filename