From 756d31031843c3363c991477fa7788b11894d619 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 9 May 2015 11:40:06 +0200 Subject: Added check against "Type const &" and "Type const *". --- src/CheckBasicStyle.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua index 133446350..9ff47634d 100755 --- a/src/CheckBasicStyle.lua +++ b/src/CheckBasicStyle.lua @@ -178,6 +178,10 @@ local g_ViolationPatterns = {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around /"}, {"^[a-zA-Z0-9]+%& [a-zA-Z0-9]+", "Add space before &"}, {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%& [a-zA-Z0-9]+", "Add space before &"}, + + -- We don't like "Type const *" and "Type const &". Use "const Type *" and "const Type &" instead: + {"const %&", "Use 'const Type &' instead of 'Type const &'"}, + {"const %*", "Use 'const Type *' instead of 'Type const *'"}, } -- cgit v1.2.3