Skip to content

Commit b8f96e7

Browse files
authored
Merge pull request #21671 from maribu/dist/tools/vera++/no-length-limit-in-comments
dist/tools/vera++: allow comments to be overlong
2 parents df58de4 + 164918b commit b8f96e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dist/tools/vera++/scripts/rules/L004.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ foreach f [getSourceFileNames] {
77
set lineNumber 1
88
foreach line [getAllLines $f] {
99
if {[string length $line] > $maxLength} {
10-
report $f $lineNumber "line is longer than ${maxLength} characters"
10+
# ignore overlong line if it appears to be within a comment
11+
if {!([string match " \* *" $line] || [string match "// *" $line])} {
12+
report $f $lineNumber "line is longer than ${maxLength} characters"
13+
}
1114
}
1215
incr lineNumber
1316
}

0 commit comments

Comments
 (0)