Class: Git::Lint::Analyzers::CommitBodyBullet
- Defined in:
- lib/git/lint/analyzers/commit_body_bullet.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.rb', line 7 def self.defaults { enabled: true, severity: :error, excludes: %w[\\* •] } end |
Instance Method Details
#issue ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/git/lint/analyzers/commit_body_bullet.rb', line 19 def issue return {} if valid? { hint: %(Avoid: #{filter_list.to_hint}.), lines: affected_commit_body_lines } end |
#valid? ⇒ Boolean
15 16 17 |
# File 'lib/git/lint/analyzers/commit_body_bullet.rb', line 15 def valid? commit.body_lines.all? { |line| !invalid_line? line } end |