aboutsummaryrefslogtreecommitdiff
path: root/clint.py
diff options
context:
space:
mode:
authorHinidu <hinidu@gmail.com>2014-04-07 00:50:05 +0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-07 12:15:28 -0300
commit39932212d8805c018a643734a7b66aedd304c45d (patch)
treef4ac6559bf8096ac2ccf6322173346adff4237f2 /clint.py
parent8a2ffb2b010e02dd8dcbb3182d5a6e27006f6e46 (diff)
downloadrneovim-39932212d8805c018a643734a7b66aedd304c45d.tar.gz
rneovim-39932212d8805c018a643734a7b66aedd304c45d.tar.bz2
rneovim-39932212d8805c018a643734a7b66aedd304c45d.zip
Added clint check for TRUE/FALSE
Diffstat (limited to 'clint.py')
-rwxr-xr-xclint.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/clint.py b/clint.py
index bba2315eb1..e15d49c07f 100755
--- a/clint.py
+++ b/clint.py
@@ -172,6 +172,7 @@ _ERROR_CATEGORIES = [
'build/printf_format',
'build/storage_class',
'readability/alt_tokens',
+ 'readability/bool',
'readability/braces',
'readability/fn_size',
'readability/multiline_comment',
@@ -2814,6 +2815,12 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension,
'Do not use variable-length arrays. Use an appropriately named '
"('k' followed by CamelCase) compile-time constant for the size.")
+ # Detect TRUE and FALSE.
+ match = Search(r'(TRUE|FALSE)', line)
+ if match:
+ token = match.group(1)
+ error(filename, linenum, 'readability/bool', 4,
+ 'Use %s instead of %s.' % (token.lower(), token))
def ProcessLine(filename, file_extension, clean_lines, line,
include_state, function_state, nesting_state, error,