Class: Git::Lint::Analyzers::CommitBodyBulletDelimiter
- Defined in:
- lib/git/lint/analyzers/commit_body_bullet_delimiter.rb
Constant Summary
Constants inherited from Abstract
Abstract::ISSUE_LINE_OFFSET, Abstract::LEVELS
Instance Attribute Summary
Attributes inherited from Abstract
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Abstract
build_issue_line, descendants, #enabled?, #error?, id, inherited, #initialize, #invalid?, label, #severity, #warning?
Constructor Details
This class inherits a constructor from Git::Lint::Analyzers::Abstract
Class Method Details
.defaults ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/git/lint/analyzers/commit_body_bullet_delimiter.rb', line 7 def self.defaults { enabled: true, severity: :error, includes: %w[\\-] } end |
Instance Method Details
#issue ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/git/lint/analyzers/commit_body_bullet_delimiter.rb', line 19 def issue return {} if valid? { hint: "Use space after bullet.", lines: affected_commit_body_lines } end |
#valid? ⇒ Boolean
15 16 17 |
# File 'lib/git/lint/analyzers/commit_body_bullet_delimiter.rb', line 15 def valid? commit.body_lines.none? { |line| invalid_line? line } end |