add check for white-space only lines; fix tests to allow for _(...) macro and function (); rather than function () ;
This commit is contained in:
parent
deeb5652e2
commit
163131f4b8
|
@ -116,15 +116,16 @@ class CStyleChecker:
|
|||
[ ( re.compile ("^ "), "leading space as indentation instead of tab - use tabs to indent, spaces to align" )
|
||||
, ( re.compile ("{[^\s]"), "missing space after open brace" )
|
||||
, ( re.compile ("[^\s]}"), "missing space before close brace" )
|
||||
, ( re.compile ("[ \t]+$"), "contains trailing whitespace" )
|
||||
, ( re.compile ("^[ \t]+$"), "empty line contains whitespace" )
|
||||
, ( re.compile ("[^\s][ \t]+$"), "contains trailing whitespace" )
|
||||
|
||||
, ( re.compile (",[^\s\n]"), "missing space after comma" )
|
||||
, ( re.compile (";[a-zA-Z0-9]"), "missing space after semi-colon" )
|
||||
, ( re.compile ("=[^\s\"'=]"), "missing space after assignment" )
|
||||
|
||||
# Open and close parenthesis.
|
||||
, ( re.compile ("[^\s\(\[\*&']\("), "missing space before open parenthesis" )
|
||||
, ( re.compile ("\)(-[^>]|[^,'\s\n\)\]-])"), "missing space after close parenthesis" )
|
||||
, ( re.compile ("[^_\s\(\[\*&']\("), "missing space before open parenthesis" )
|
||||
, ( re.compile ("\)(-[^>]|[^;,'\s\n\)\]-])"), "missing space after close parenthesis" )
|
||||
, ( re.compile ("\( [^;]"), "space after open parenthesis" )
|
||||
, ( re.compile ("[^;] \)"), "space before close parenthesis" )
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user