From ff85c67c2923b3eb4e261c18a8c2d939635e44cb Mon Sep 17 00:00:00 2001
From: Vidar Holen <spam@vidarholen.net>
Date: Fri, 30 Nov 2012 16:13:42 -0800
Subject: [PATCH] Fixed mistaked message for tr '[:upper:]'

---
 ShellCheck/Analytics.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ShellCheck/Analytics.hs b/ShellCheck/Analytics.hs
index d42ca90..8e43f67 100644
--- a/ShellCheck/Analytics.hs
+++ b/ShellCheck/Analytics.hs
@@ -575,6 +575,8 @@ prop_checkTr1 = verify checkTr "tr [a-f] [A-F]"
 prop_checkTr2 = verify checkTr "tr 'a-z' 'A-Z'"
 prop_checkTr2a= verify checkTr "tr '[a-z]' '[A-Z]'"
 prop_checkTr3 = verifyNot checkTr "tr -d '[:lower:]'"
+prop_checkTr3a= verifyNot checkTr "tr -d '[:upper:]'"
+prop_checkTr3b= verifyNot checkTr "tr -d '|/_[:upper:]'"
 prop_checkTr4 = verifyNot checkTr "ls [a-z]"
 prop_checkTr5 = verify checkTr "tr foo bar"
 prop_checkTr6 = verify checkTr "tr 'hello' 'world'"
@@ -590,7 +592,7 @@ checkTr = checkCommand "tr" (mapM_ f)
                 Just "A-Z" -> info (getId word) "Use '[:upper:]' to support accents and foreign alphabets."
 
                 Just s -> do  -- Eliminate false positives by only looking for dupes in SET2?
-                            when ((not $ "-" `isPrefixOf` s) && duplicated s) $
+                            when ((not $ "-" `isPrefixOf` s || "[:" `isInfixOf` s) && duplicated s) $
                                 info (getId word) "tr replaces sets of chars, not words (mentioned due to duplicates)."
 
                             unless ("[:" `isPrefixOf` s) $