Class: Git::Lint::Analyzers::CommitTrailerReviewerKey

Inherits:
Abstract
  • Object
show all
Defined in:
lib/git/lint/analyzers/commit_trailer_reviewer_key.rb

Overview

Analyzes commit trailer reviwer key usage.

Constant Summary

Constants inherited from Abstract

Abstract::BODY_OFFSET, Abstract::LEVELS

Instance Attribute Summary

Attributes inherited from Abstract

#commit

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

#issueObject



12
13
14
15
16
17
18
19
# File 'lib/git/lint/analyzers/commit_trailer_reviewer_key.rb', line 12

def issue
  return {} if valid?

  {
    hint: "Use: #{filter_list.to_usage}.",
    lines: affected_commit_trailers
  }
end

#valid?Boolean

Returns:

  • (Boolean)


10
# File 'lib/git/lint/analyzers/commit_trailer_reviewer_key.rb', line 10

def valid? = affected_commit_trailers.empty?