Class: Wool::MisalignedUnindentationWarning

Inherits:
LineWarning show all
Defined in:
lib/wool/warnings/misaligned_unindentation.rb

Overview

This warning is used when

Instance Attribute Summary

Attributes inherited from Warning

#body, #file, #line_number, #name, #settings, #severity

Instance Method Summary collapse

Methods inherited from LineWarning

options

Methods inherited from Warning

all_types, all_warnings, concrete_warnings, #count_occurrences, #desc, #fixable?, #generated_warnings, #get_indent, #indent, inherited, #match?, opt, options, setting_accessor, type

Methods included from Advice

#advice_counter, #after_advice, #argument_advice, #before_advice, #bump_advice_counter!, #with_advice

Methods included from ModuleExtensions

#attr_accessor_with_default, #cattr_accessor, #cattr_accessor_with_default, #cattr_get_and_setter, #cattr_reader, #cattr_writer

Methods included from SexpAnalysis

#find_sexps, #parse

Methods included from LexicalAnalysis

#find_keyword, #find_token, #lex, #select_token, #split_on_keyword, #split_on_token, #text_between_token_positions

Constructor Details

#initialize(file, line, expectation) ⇒ MisalignedUnindentationWarning

Returns a new instance of MisalignedUnindentationWarning.



8
9
10
11
# File 'lib/wool/warnings/misaligned_unindentation.rb', line 8

def initialize(file, line, expectation)
  super(file, line)
  @expectation = expectation
end

Instance Method Details

#fixObject



13
14
15
# File 'lib/wool/warnings/misaligned_unindentation.rb', line 13

def fix
  indent self.line, @expectation
end