Class: HamlLint::OffenseCollector
- Inherits:
-
RuboCop::Formatter::BaseFormatter
- Object
- RuboCop::Formatter::BaseFormatter
- HamlLint::OffenseCollector
- Defined in:
- lib/haml_lint/linter/rubocop.rb
Overview
Collects offenses detected by RuboCop.
Class Attribute Summary collapse
-
.offenses ⇒ Object
List of offenses reported by RuboCop.
Instance Method Summary collapse
-
#file_finished(_file, offenses) ⇒ Object
Executed when a file has been scanned by RuboCop, adding the reported offenses to our collection.
-
#started(_target_files) ⇒ Object
Executed when RuboCop begins linting.
Class Attribute Details
.offenses ⇒ Object
List of offenses reported by RuboCop.
350 351 352 |
# File 'lib/haml_lint/linter/rubocop.rb', line 350 def offenses @offenses end |
Instance Method Details
#file_finished(_file, offenses) ⇒ Object
Executed when a file has been scanned by RuboCop, adding the reported offenses to our collection.
365 366 367 |
# File 'lib/haml_lint/linter/rubocop.rb', line 365 def file_finished(_file, offenses) self.class.offenses += offenses end |
#started(_target_files) ⇒ Object
Executed when RuboCop begins linting.
356 357 358 |
# File 'lib/haml_lint/linter/rubocop.rb', line 356 def started(_target_files) self.class.offenses = [] end |