From 83b732c7328f1c4601e1a64ce234b93615c0ddc8 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 26 Nov 2014 13:27:33 +0100 Subject: [PATCH] checkstyle.vim: add catch to checked keywords * Check catch() without space * Check }\ncatch () with newline * Remove false positive on area_for() and other functions ending with a keyword --- 3rdparty/pulkomandy/checkstyle.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3rdparty/pulkomandy/checkstyle.vim b/3rdparty/pulkomandy/checkstyle.vim index 82d09a5aba..683c7c89e8 100644 --- a/3rdparty/pulkomandy/checkstyle.vim +++ b/3rdparty/pulkomandy/checkstyle.vim @@ -20,7 +20,7 @@ :fu FuncHaikuCheck() call matchadd('Style', '\%>80v.\+', -1) " line over 80 char call matchadd('Style', '^\s* \s*', -1) " spaces instead of tabs - call matchadd('Style', '\(for\|if\|select\|switch\|while\)(', -1) + call matchadd('Style', '[\t ]\(for\|if\|select\|switch\|while\|catch\)(', -1) "missing space after control statement call matchadd('Style', '^\(\(?!\/\/\|\/\*\).\)*//\S', -1) " Missing space at comment start @@ -39,6 +39,7 @@ " > operator at EOL (without false positive on #include ) call matchadd('Style', '){', -1) " Missing space after method header call matchadd('Style', '}\n\s*else', -1) " Malformed else + call matchadd('Style', '}\n\s*catch', -1) " Malformed catch call matchadd('Style', '\s$', -1) "Spaces at end of line call matchadd('Style', ',\S', -1) " Missing space after comma call matchadd('Style', '^}\n\{1,2}\S', -1)