Commit a1e1ac8e authored by math's avatar math
Browse files

[FIX #46] now curly braces which have not their own line should be recognized

parent 933b32e1
......@@ -1748,8 +1748,8 @@ def CheckBraces(filename, clean_lines, linenum, error):
line = clean_lines.elided[linenum] # get rid of comments and strings
if Match(r'{', line):
if not Match(r'^\s*{\s*$', line):
if Search(r'{', line):
if not Match(r'^\s*{$', line):
error(filename, linenum, 'readability/braces', 5, 'Starting braces have a line for themselfs.')
if Search(r'}', line):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment