Sha256: d3e8871717fc3d92df4b1256a7e61be71dd08882ac9a5f6083f2add72c38eb83

Contents?: true

Size: 536 Bytes

Versions: 9

Compression:

Stored size: 536 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 = settings.commits_author_name_minimum
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
git-lint-8.8.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.7.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.6.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.5.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.4.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.3.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.2.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.1.0 lib/git/lint/analyzers/commit_author_name.rb
git-lint-8.0.0 lib/git/lint/analyzers/commit_author_name.rb