From a455b9e805315264f4b805273640d1d17816cda0 Mon Sep 17 00:00:00 2001 From: Weigang Geng Date: Tue, 15 Feb 2022 23:56:34 -0800 Subject: [PATCH] fix issue 2450 ipv6 warning --- src/ShellCheck/Analytics.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index d48104e..e74966a 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -2703,7 +2703,7 @@ checkCharRangeGlob p t@(T_Glob id str) | && contents /= ":" then warn id 2101 "Named class needs outer [], e.g. [[:digit:]]." else - when ('[' `notElem` contents && hasDupes) $ + when ('[' `notElem` contents && ':' `notElem` contents && hasDupes) $ info id 2102 "Ranges can only match single chars (mentioned due to duplicates)." where isCharClass str = "[" `isPrefixOf` str && "]" `isSuffixOf` str