Class: Git::Lint::Analyzers::CommitTrailerSignerName

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

Overview

Analyzes commit trailer signer name construction.

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



16
17
18
19
20
21
22
23
# File 'lib/git/lint/analyzers/commit_trailer_signer_name.rb', line 16

def issue
  return {} if valid?

  {
    hint: "Name must follow key and consist of #{minimum} parts (minimum).",
    lines: affected_commit_trailers
  }
end

#valid?Boolean

Returns:

  • (Boolean)


14
# File 'lib/git/lint/analyzers/commit_trailer_signer_name.rb', line 14

def valid? = affected_commit_trailers.empty?