diff options
author | Mattes D <github@xoft.cz> | 2015-05-09 09:25:09 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-05-09 12:58:54 +0200 |
commit | c13b1931ff26a5643c9fe68ab32b1e362cfacd70 (patch) | |
tree | 0c19db714a5dd08eb2775b39487e96cf317cf867 /src/CheckBasicStyle.lua | |
parent | Rabbit and cooked rabbit now stackable (diff) | |
download | cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar.gz cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar.bz2 cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar.lz cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar.xz cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.tar.zst cuberite-c13b1931ff26a5643c9fe68ab32b1e362cfacd70.zip |
Diffstat (limited to '')
-rwxr-xr-x | src/CheckBasicStyle.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua index 8cd454e8f..09e64b954 100755 --- a/src/CheckBasicStyle.lua +++ b/src/CheckBasicStyle.lua @@ -149,6 +149,27 @@ local g_ViolationPatterns = -- No space before a closing parenthesis: {" %)", "Remove the 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 +"}, + --[[ + -- Cannot check these because of text such as "X+" and "+2" appearing in some comments. + {"^[a-zA-Z0-9]+ %+[a-zA-Z0-9]+", "Add space after +"}, + {"[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+ %+[a-zA-Z0-9]+", "Add space after +"}, + {"^[a-zA-Z0-9]+%+ [a-zA-Z0-9]+", "Add space before +"}, + {"[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%+ [a-zA-Z0-9]+", "Add space before +"}, + --]] + + -- 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 *"}, + + -- 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 /"}, } |