Class: FitCommit::Validators::Frathouse
- Defined in:
- lib/fit-commit/validators/frathouse.rb
Instance Attribute Summary
Attributes inherited from Base
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
7 8 9 10 11 |
# File 'lib/fit-commit/validators/frathouse.rb', line 7 def validate_line(lineno, text, branch_name) if branch_name == "master" && Swearjar.default.profane?(text) add_error(lineno, "No frat house commit messages in master.") end end |