Sha256: 1387c40fe6ee31c9747f7c369efa5658e6ec28ed07cc36ea9474c55aaa4a5505

Contents?: true

Size: 541 Bytes

Versions: 11

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Analyzers
      # Analyzes author name for minimum parts of name.
      class CommitAuthorName < Abstract
        include Import[validator: "validators.name"]

        def valid? = validator.call(commit.author_name, minimum:)

        def issue
          return {} if valid?

          {hint: "Author name must consist of #{minimum} parts (minimum)."}
        end

        private

        def minimum = configuration.commits_author_name_minimum
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
git-lint-7.5.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-7.3.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-7.2.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-7.1.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-7.0.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.2.1 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.2.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.1.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.0.2 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.0.1 lib/git/lint/analyzers/commit_author_name.rb
git-lint-6.0.0 lib/git/lint/analyzers/commit_author_name.rb