diff --git a/tools/vera++/scripts/rules/jerry_no_space_before_closing_parentheses.tcl b/tools/vera++/scripts/rules/jerry_no_space_before_closing_parentheses.tcl index 8ddc38fe5f..cb361569e7 100644 --- a/tools/vera++/scripts/rules/jerry_no_space_before_closing_parentheses.tcl +++ b/tools/vera++/scripts/rules/jerry_no_space_before_closing_parentheses.tcl @@ -27,15 +27,32 @@ proc check_part_of_the_file {file line_num col_start col_end} { } } + + + + + foreach fileName [getSourceFileNames] { set checkLine 1 set checkColStart 0 set seenOmitToken false + + + + + + + foreach token [getTokens $fileName 1 0 -1 -1 {}] { set lineNumber [lindex $token 1] set colNumber [lindex $token 2] set tokenType [lindex $token 3] + + + + + if {$checkLine != $lineNumber} { if {!$seenOmitToken} { check_part_of_the_file $fileName $checkLine $checkColStart end @@ -46,6 +63,11 @@ foreach fileName [getSourceFileNames] { set checkColStart $colNumber } + + + + + if {$tokenType in {ccomment cppcomment stringlit}} { check_part_of_the_file $fileName $checkLine $checkColStart $colNumber set seenOmitToken true