summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVidar Holen <vidar@vidarholen.net>2018-09-12 16:01:43 -0700
committerGitHub <noreply@github.com>2018-09-12 16:01:43 -0700
commit228af7df544c5e449e20d74b5a98ca38e9a34011 (patch)
tree6a96e0f0404df50f190110c59029768c9ce8768d
parentf0a2e688c45a615f647b3a9ceffcd7ac35a0e882 (diff)
parent6db392511bb236eab950a7837952277b52ab3dcd (diff)
Merge pull request #1337 from dimo414/master
Expand "rhs"; this abbreviation seems needlessly obfuscating.
-rw-r--r--src/ShellCheck/Analytics.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs
index 738f033..7cab7e8 100644
--- a/src/ShellCheck/Analytics.hs
+++ b/src/ShellCheck/Analytics.hs
@@ -1020,7 +1020,7 @@ checkQuotedCondRegex _ (TC_Binary _ _ "=~" _ rhs) =
error t =
unless (isConstantNonRe t) $
err (getId t) 2076
- "Don't quote rhs of =~, it'll match literally rather than as a regex."
+ "Don't quote right-hand side of =~, it'll match literally rather than as a regex."
re = mkRegex "[][*.+()|]"
hasMetachars s = s `matches` re
isConstantNonRe t = fromMaybe False $ do
@@ -1189,7 +1189,7 @@ prop_checkComparisonAgainstGlob4 = verifyNot checkComparisonAgainstGlob "[ $cow
prop_checkComparisonAgainstGlob5 = verify checkComparisonAgainstGlob "[[ $cow != $bar ]]"
checkComparisonAgainstGlob _ (TC_Binary _ DoubleBracket op _ (T_NormalWord id [T_DollarBraced _ _]))
| op `elem` ["=", "==", "!="] =
- warn id 2053 $ "Quote the rhs of " ++ op ++ " in [[ ]] to prevent glob matching."
+ warn id 2053 $ "Quote the right-hand side of " ++ op ++ " in [[ ]] to prevent glob matching."
checkComparisonAgainstGlob _ (TC_Binary _ SingleBracket op _ word)
| (op == "=" || op == "==") && isGlob word =
err (getId word) 2081 "[ .. ] can't match globs. Use [[ .. ]] or case statement."