From 36263fb3f55ba06c58fc89f3678ea26997affde6 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Tue, 5 Jul 2016 08:51:40 -0700 Subject: [PATCH] s/range/class/ when warning about tr '[abc]' --- ShellCheck/Checks/Commands.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellCheck/Checks/Commands.hs b/ShellCheck/Checks/Commands.hs index 801cccc..c5864fe 100644 --- a/ShellCheck/Checks/Commands.hs +++ b/ShellCheck/Checks/Commands.hs @@ -150,7 +150,7 @@ checkTr = CommandCheck (Basename "tr") (mapM_ f . arguments) info (getId word) 2020 "tr replaces sets of chars, not words (mentioned due to duplicates)." unless ("[:" `isPrefixOf` s) $ when ("[" `isPrefixOf` s && "]" `isSuffixOf` s && (length s > 2) && ('*' `notElem` s)) $ - info (getId word) 2021 "Don't use [] around ranges in tr, it replaces literal square brackets." + info (getId word) 2021 "Don't use [] around classes in tr, it replaces literal square brackets." Nothing -> return () duplicated s =