class HamlLint::OffenseCollector
Collects offenses detected by RuboCop.
Attributes
offenses[RW]
List of offenses reported by RuboCop.
Public Instance Methods
file_finished(_file, offenses)
click to toggle source
Executed when a file has been scanned by RuboCop, adding the reported offenses to our collection.
@param _file [String] @param offenses [Array<RuboCop::Cop::Offense>]
# File lib/haml_lint/linter/rubocop.rb, line 366 def file_finished(_file, offenses) self.class.offenses += offenses end
started(_target_files)
click to toggle source
Executed when RuboCop begins linting.
@param _target_files [Array<String>]
# File lib/haml_lint/linter/rubocop.rb, line 357 def started(_target_files) self.class.offenses = [] end