Class: Git::Lint::Analyzers::CommitBodyBulletCapitalization
- Defined in:
- lib/git/lint/analyzers/commit_body_bullet_capitalization.rb
Overview
Analyzes commit body for proper capitalization of bullet sentences.
Constant Summary
Constants inherited from Abstract
Abstract::BODY_OFFSET, Abstract::LEVELS
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
build_issue_line, #error?, id, #initialize, #invalid?, label, #severity, #warning?
Constructor Details
This class inherits a constructor from Git::Lint::Analyzers::Abstract
Instance Method Details
#issue ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/git/lint/analyzers/commit_body_bullet_capitalization.rb', line 10 def issue return {} if valid? { hint: "Capitalize first word.", lines: affected_commit_body_lines } end |
#valid? ⇒ Boolean
8 |
# File 'lib/git/lint/analyzers/commit_body_bullet_capitalization.rb', line 8 def valid? = lowercased_bullets.empty? |