Class: RuboCop::Formatter::DisabledLinesFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- RuboCop::Formatter::DisabledLinesFormatter
- Includes:
- Colorizable, PathUtil
- Defined in:
- lib/rubocop/formatter/disabled_lines_formatter.rb
Overview
A basic formatter that displays the lines disabled inline comments.
Instance Attribute Summary collapse
-
#cop_disabled_line_ranges ⇒ Object
readonly
Returns the value of attribute cop_disabled_line_ranges.
Attributes inherited from BaseFormatter
Instance Method Summary collapse
- #file_started(file, options) ⇒ Object
- #finished(_inspected_files) ⇒ Object
- #started(_target_files) ⇒ Object
Methods included from Colorizable
Methods included from PathUtil
absolute?, chdir, hidden_dir?, hidden_file_in_not_hidden_dir?, match_path?, pwd, relative_path, reset_pwd, smart_path
Methods inherited from BaseFormatter
Constructor Details
This class inherits a constructor from RuboCop::Formatter::BaseFormatter
Instance Attribute Details
#cop_disabled_line_ranges ⇒ Object (readonly)
Returns the value of attribute cop_disabled_line_ranges.
11 12 13 |
# File 'lib/rubocop/formatter/disabled_lines_formatter.rb', line 11 def cop_disabled_line_ranges @cop_disabled_line_ranges end |
Instance Method Details
#file_started(file, options) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rubocop/formatter/disabled_lines_formatter.rb', line 17 def file_started(file, ) return unless [:cop_disabled_line_ranges] @cop_disabled_line_ranges[file] = [:cop_disabled_line_ranges] end |
#finished(_inspected_files) ⇒ Object
24 25 26 |
# File 'lib/rubocop/formatter/disabled_lines_formatter.rb', line 24 def finished(_inspected_files) cops_disabled_in_comments_summary end |
#started(_target_files) ⇒ Object
13 14 15 |
# File 'lib/rubocop/formatter/disabled_lines_formatter.rb', line 13 def started(_target_files) @cop_disabled_line_ranges = {} end |