mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 21:41:34 -07:00
Don't consider .*
a glob-like regex (fixes #1214)
This commit is contained in:
parent
c0d3a98fcd
commit
914974bd4f
2 changed files with 5 additions and 2 deletions
|
@ -791,7 +791,7 @@ isCommandMatch token matcher = fromMaybe False $
|
|||
-- False: .*foo.*
|
||||
isConfusedGlobRegex :: String -> Bool
|
||||
isConfusedGlobRegex ('*':_) = True
|
||||
isConfusedGlobRegex [x,'*'] | x /= '\\' = True
|
||||
isConfusedGlobRegex [x,'*'] | x `notElem` "\\." = True
|
||||
isConfusedGlobRegex _ = False
|
||||
|
||||
isVariableStartChar x = x == '_' || isAsciiLower x || isAsciiUpper x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue