summaryrefslogtreecommitdiffstats
path: root/src/CheckBasicStyle.lua
diff options
context:
space:
mode:
authormohe2015 <mohe2015@users.noreply.github.com>2016-10-20 19:09:18 +0200
committerMattes D <github@xoft.cz>2016-10-20 19:09:18 +0200
commit502b5ec73222efaadd5ca6dc3e2011b740162b29 (patch)
treec2c7f0124fd602234a3a4dec0c81ab5171e7b4a1 /src/CheckBasicStyle.lua
parentAPIDump: Added missing syntax to cUrlClient (#3407) (diff)
downloadcuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar.gz
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar.bz2
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar.lz
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar.xz
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.tar.zst
cuberite-502b5ec73222efaadd5ca6dc3e2011b740162b29.zip
Diffstat (limited to '')
-rwxr-xr-xsrc/CheckBasicStyle.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua
index 8d188bb67..6cd499fd1 100755
--- a/src/CheckBasicStyle.lua
+++ b/src/CheckBasicStyle.lua
@@ -203,6 +203,10 @@ local g_ViolationPatterns =
-- 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 *'"},
+
+ -- Check if "else" is on the same line as a brace.
+ {"}%s*else", "else has to be on a separate line"},
+ {"else%s*{", "else has to be on a separate line"},
}