Class: Git::Lint::Analyzers::CommitTrailerCollaboratorEmail

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

Overview

Analyzes commit trailer collaborator email address format.

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_collaborator_email.rb', line 16

def issue
  return {} if valid?

  {
    hint: %(Email must follow name and use format: "<[email protected]>".),
    lines: affected_commit_trailers
  }
end

#valid?Boolean

Returns:

  • (Boolean)


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

def valid? = affected_commit_trailers.empty?