lib/rubocop/git/runner.rb in rubocop-git-0.1.2 vs lib/rubocop/git/runner.rb in rubocop-git-0.1.3
- old
+ new
@@ -45,12 +45,14 @@
def display_violations(io)
formatter = RuboCop::Formatter::ClangStyleFormatter.new(io)
formatter.started(nil)
violations.map do |violation|
+ offenses = violation.offenses
+ offenses = offenses.reject(&:disabled?) if offenses.first.respond_to?(:disabled?)
formatter.file_finished(
violation.filename,
- violation.offenses.compact.sort.freeze
+ offenses.compact.sort.freeze
)
end
formatter.finished(@files.map(&:filename).freeze)
end