Skip to content

Commit e62f44c

Browse files
committed
Fix false negative in comment check
Adds anchor to regex.
1 parent 81cad06 commit e62f44c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/msftidy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def check_lines
523523
end
524524

525525
# The rest of these only count if it's not a comment line
526-
next if ln =~ /[[:space:]]*#/
526+
next if ln =~ /^[[:space:]]*#/
527527

528528
if ln =~ /\$std(?:out|err)/i or ln =~ /[[:space:]]puts/
529529
next if ln =~ /^[\s]*["][^"]+\$std(?:out|err)/

0 commit comments

Comments
 (0)