mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-22 06:13:54 -07:00
fix issue 2450 ipv6 warning
This commit is contained in:
parent
88cdb4e2c9
commit
a455b9e805
1 changed files with 1 additions and 1 deletions
|
@ -2703,7 +2703,7 @@ checkCharRangeGlob p t@(T_Glob id str) |
|
||||||
&& contents /= ":"
|
&& contents /= ":"
|
||||||
then warn id 2101 "Named class needs outer [], e.g. [[:digit:]]."
|
then warn id 2101 "Named class needs outer [], e.g. [[:digit:]]."
|
||||||
else
|
else
|
||||||
when ('[' `notElem` contents && hasDupes) $
|
when ('[' `notElem` contents && ':' `notElem` contents && hasDupes) $
|
||||||
info id 2102 "Ranges can only match single chars (mentioned due to duplicates)."
|
info id 2102 "Ranges can only match single chars (mentioned due to duplicates)."
|
||||||
where
|
where
|
||||||
isCharClass str = "[" `isPrefixOf` str && "]" `isSuffixOf` str
|
isCharClass str = "[" `isPrefixOf` str && "]" `isSuffixOf` str
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue