From 846d16315a8b5a81fbc37d66da4d1254038ec494 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 9 May 2015 11:16:56 +0200 Subject: CheckBasicStyle: checks spaces around * and &. --- src/CheckBasicStyle.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/CheckBasicStyle.lua') diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua index 09e64b954..133446350 100755 --- a/src/CheckBasicStyle.lua +++ b/src/CheckBasicStyle.lua @@ -164,12 +164,20 @@ local g_ViolationPatterns = -- Cannot check spaces around "-", because the minus is sometimes used as a hyphen between-words -- Check spaces around "*": - {"^[a-zA-Z0-9]+%*[a-zA-Z0-9]+", "Add space around *"}, - {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%*[a-zA-Z0-9]+", "Add space around *"}, + {"^[a-zA-Z0-9]+%*[a-zA-Z0-9]+", "Add space around *"}, + {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%*[a-zA-Z0-9]+", "Add space around *"}, + {"^[a-zB-Z0-9]+%* [a-zA-Z0-9]+", "Add space before *"}, + {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zB-Z0-9]+%* [a-zA-Z0-9]+", "Add space before *"}, -- Check spaces around "/": {"^[a-zA-Z0-9]+%/[a-zA-Z0-9]+", "Add space around /"}, {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%/[a-zA-Z0-9]+", "Add space around /"}, + + -- Check spaces around "&": + {"^[a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around /"}, + {"^[^\"]*[!@#$%%%^&*() %[%]\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 &"}, } -- cgit v1.2.3