You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# have to adjust to get `\n` so we delete the whole line
49
+
add_offense(processed_source.to_source_range(comment_node.loc.adjust(end_pos: 1)),"Unused erblint:counter comment for #{rule_name}","")ifcomment_node
50
+
return
51
+
end
52
+
53
+
first_offense=@offenses[0]
54
+
55
+
ifcomment_node.nil?
56
+
add_offense(processed_source.to_source_range(first_offense.source_range),"#{rule_name}: If you must, add <%# erblint:counter #{rule_name}#{offenses_count} %> to bypass this check.","<%# erblint:counter #{rule_name}#{offenses_count} %>")
57
+
else
58
+
clear_offenses
59
+
add_offense(processed_source.to_source_range(comment_node.loc),"Incorrect erblint:counter number for #{rule_name}. Expected: #{expected_count}, actual: #{offenses_count}.","<%# erblint:counter #{rule_name}#{offenses_count} %>")ifexpected_count != offenses_count
0 commit comments