Class: FitCommit::Validators::SummaryPeriod

Inherits:
Base
  • Object
show all
Defined in:
lib/fit-commit/validators/summary_period.rb

Instance Attribute Summary

Attributes inherited from Base

#branch_name, #lines

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, #validate

Methods included from HasErrors

#add_error, #add_warning, #errors, #merge_errors, #merge_warnings, #warnings

Constructor Details

This class inherits a constructor from FitCommit::Validators::Base

Instance Method Details

#validate_line(lineno, text, branch_name) ⇒ Object



6
7
8
9
10
# File 'lib/fit-commit/validators/summary_period.rb', line 6

def validate_line(lineno, text, branch_name)
  if lineno == 1 && text.end_with?(".")
    add_error(lineno, "Do not end your summary with a period.")
  end
end