Class: Pronto::ClangFormat::OffenceCategorizer::TrailingWhitespaceCategorizer

Inherits:
AbstractCategorizer
  • Object
show all
Defined in:
lib/pronto/clang_format/offence_categorizer/trailing_whitespace_categorizer.rb

Instance Method Summary collapse

Methods inherited from AbstractCategorizer

#handle, #initialize

Constructor Details

This class inherits a constructor from Pronto::ClangFormat::OffenceCategorizer::AbstractCategorizer

Instance Method Details

#handle_current(offence) ⇒ Object



7
8
9
10
11
# File 'lib/pronto/clang_format/offence_categorizer/trailing_whitespace_categorizer.rb', line 7

def handle_current(offence)
  return unless /[[:blank:]]+[\n]/.match(offence.replaced_text)

  "Remove trailing whitespace"
end