Change error 2076 to a warning.

Implementing the suggestion by @pixarbuff #1985.
This commit is contained in:
Martin Bagge / brother 2020-12-27 00:27:36 +01:00 committed by GitHub
parent bd3299edd3
commit 19355226e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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