summaryrefslogtreecommitdiffstats
path: root/src/CheckBasicStyle.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-09 11:16:56 +0200
committerMattes D <github@xoft.cz>2015-05-09 12:58:55 +0200
commit846d16315a8b5a81fbc37d66da4d1254038ec494 (patch)
tree2a7c873756a3063480a64a975491bd58d9538554 /src/CheckBasicStyle.lua
parentMore style checking. (diff)
downloadcuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.gz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.bz2
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.lz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.xz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.zst
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.zip
Diffstat (limited to 'src/CheckBasicStyle.lua')
-rwxr-xr-xsrc/CheckBasicStyle.lua12
1 files changed, 10 insertions, 2 deletions
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 &"},
}