Skip to content

Commit e01a226

Browse files
committed
Do not include violations that don't have any offenses
1 parent e996dd6 commit e01a226

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rubocop/git/runner.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def run(options)
1818
private
1919

2020
def violations
21-
@violations ||= style_checker.violations
21+
@violations ||= style_checker.violations.reject do |violation|
22+
return false unless violation.offenses.first.respond_to?(:disabled?)
23+
violation.offenses.all?(&:disabled?)
24+
end
2225
end
2326

2427
def style_checker

0 commit comments

Comments
 (0)