Class: Guideline::HardTabIndentChecker
- Defined in:
- lib/guideline/checkers/hard_tab_indent_checker.rb
Instance Method Summary collapse
Methods inherited from Checker
#errors, #has_error?, #initialize, #report
Constructor Details
This class inherits a constructor from Guideline::Checker
Instance Method Details
#check(path) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/guideline/checkers/hard_tab_indent_checker.rb', line 3 def check(path) path.each_line.with_index do |line, index| if line =~ /^ *\t/ report( :message => "Use space indent instead of hard tab indent", :path => path, :line => index + 1 ) end end end |