Prevent SC2101 to collide with 2060 for tr -d [:space:]

This commit is contained in:
Vidar Holen 2014-04-12 16:43:57 -07:00
parent 81956d324d
commit d63406abe4
1 changed files with 3 additions and 1 deletions

View File

@ -2252,7 +2252,9 @@ prop_checkCharRangeGlob1 = verify checkCharRangeGlob "ls *[:digit:].jpg"
prop_checkCharRangeGlob2 = verifyNot checkCharRangeGlob "ls *[[:digit:]].jpg" prop_checkCharRangeGlob2 = verifyNot checkCharRangeGlob "ls *[[:digit:]].jpg"
prop_checkCharRangeGlob3 = verify checkCharRangeGlob "ls [10-15]" prop_checkCharRangeGlob3 = verify checkCharRangeGlob "ls [10-15]"
prop_checkCharRangeGlob4 = verifyNot checkCharRangeGlob "ls [a-zA-Z]" prop_checkCharRangeGlob4 = verifyNot checkCharRangeGlob "ls [a-zA-Z]"
checkCharRangeGlob _ (T_Glob id str) | isCharClass str = prop_checkCharRangeGlob5 = verifyNot checkCharRangeGlob "tr -d [a-zA-Z]" -- tr has 2060
checkCharRangeGlob p t@(T_Glob id str) |
isCharClass str && not (isParamTo (parentMap p) "tr" t) =
if ":" `isPrefixOf` contents if ":" `isPrefixOf` contents
&& ":" `isSuffixOf` contents && ":" `isSuffixOf` contents
&& contents /= ":" && contents /= ":"