Merge pull request #2117 from brother/patch-1

Change error 2076 to a warning.
This commit is contained in:
Vidar Holen 2021-03-07 20:47:53 -08:00 committed by GitHub
commit a69d6cb661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1216,8 +1216,8 @@ checkQuotedCondRegex _ (TC_Binary _ _ "=~" _ rhs) =
where
error t =
unless (isConstantNonRe t) $
err (getId t) 2076
"Don't quote right-hand side of =~, it'll match literally rather than as a regex."
warn (getId t) 2076
"Remove quotes from right-hand side of =~ to match as a regex rather than literally."
re = mkRegex "[][*.+()|]"
hasMetachars s = s `matches` re
isConstantNonRe t = fromMaybe False $ do