Class: ERBLint::Linters::DeprecatedClasses

Inherits:
ERBLint::Linter show all
Includes:
ERBLint::LinterRegistry
Defined in:
lib/erb_lint/linters/deprecated_classes.rb

Overview

Checks for deprecated classes in the start tags of HTML elements.

Defined Under Namespace

Classes: ConfigSchema, RuleSet

Constant Summary

Constants included from ERBLint::LinterRegistry

ERBLint::LinterRegistry::CUSTOM_LINTERS_DIR

Instance Attribute Summary

Attributes inherited from ERBLint::Linter

#offenses

Instance Method Summary collapse

Methods included from ERBLint::LinterRegistry

clear, find_by_name, included, linters, load_custom_linters

Methods inherited from ERBLint::Linter

#add_offense, #clear_offenses, #enabled?, #excludes_file?, inherited, support_autocorrect?

Constructor Details

#initialize(file_loader, config) ⇒ DeprecatedClasses

Returns a new instance of DeprecatedClasses.



27
28
29
30
# File 'lib/erb_lint/linters/deprecated_classes.rb', line 27

def initialize(file_loader, config)
  super
  @addendum = @config.addendum
end

Instance Method Details

#run(processed_source) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/erb_lint/linters/deprecated_classes.rb', line 32

def run(processed_source)
  process_nested_offenses(
    source: processed_source,
    offset: 0,
    parent_source: processed_source,
  )
end