summaryrefslogtreecommitdiffstats
path: root/src/CheckBasicStyle.lua
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-07-31 19:26:33 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-07-31 19:26:33 +0200
commitd19cde93fa3344f318fb0d4ffbf5bb0397a51a75 (patch)
treeb5ee221d8a8e63c7d3b7868da1db19bf717a6ffd /src/CheckBasicStyle.lua
parentMerge pull request #2400 from cuberite/OffloadBadChunks (diff)
parentUnified the doxy-comment format. (diff)
downloadcuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.gz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.bz2
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.lz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.xz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.zst
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.zip
Diffstat (limited to '')
-rwxr-xr-xsrc/CheckBasicStyle.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua
index fa20f18f7..9521534a8 100755
--- a/src/CheckBasicStyle.lua
+++ b/src/CheckBasicStyle.lua
@@ -127,6 +127,18 @@ local g_ViolationPatterns =
-- Check that all "//"-style comments have at least one spaces after:
{"%s//[^%s/*<]", "Needs a space after a \"//\"-style comment"},
+ -- Check that doxy-comments are used only in the double-asterisk form:
+ {"/// ", "Use doxycomments in the form /** Comment */"},
+
+ -- Check that /* */ comments have whitespace around the insides:
+ {"%*%*/", "Wrong comment termination, use */"},
+ {"/%*[^%s*/\"]", "Needs a space after /*"}, -- Need to take care of the special "//*/" comment ends
+ {"/%*%*[^%s*<]", "Needs a space after /**"},
+ {"[^%s/*]%*/", "Needs a space before */"},
+
+ -- Check against MS XML doxycomments:
+ {"/%*%* <", "Remove the MS XML markers from comment"},
+
-- Check that all commas have spaces after them and not in front of them:
{" ,", "Extra space before a \",\""},
{",[^%s\"%%\']", "Needs a space after a \",\""}, -- Report all except >> "," << needed for splitting and >>,%s<< needed for formatting