Sha256: 2ce32d174f510a5c5ced10f3154c467746edc379c9247c6e25f06c8176e1f004

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Analyzers
      # Analyzes author email address for proper format.
      class CommitAuthorEmail < Abstract
        include Dependencies[validator: "validators.email"]

        def valid? = validator.call commit.author_email

        def issue
          return {} if valid?

          {hint: %(Use "<name>@<server>.<domain>" instead of "#{commit.author_email}".)}
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git-lint-9.1.0 lib/git/lint/analyzers/commit_author_email.rb
git-lint-9.0.0 lib/git/lint/analyzers/commit_author_email.rb