Sha256: cadff3bd71c1b9eeb4bcbcac5bd87aeedce3fab25b1133b6caa0f98c517ef6d3

Contents?: true

Size: 640 Bytes

Versions: 8

Compression:

Stored size: 640 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Analyzers
      # Analyzes author for proper capitalization of author name.
      class CommitAuthorCapitalization < Abstract
        def initialize commit, validator: Validators::Capitalization, **dependencies
          super commit, **dependencies
          @validator = validator
        end

        def valid? = validator.new(commit.author_name).valid?

        def issue
          return {} if valid?

          {hint: %(Capitalize each part of name: "#{commit.author_name}".)}
        end

        private

        attr_reader :validator
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
git-lint-4.6.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.5.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.4.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.3.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.2.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.1.0 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.0.1 lib/git/lint/analyzers/commit_author_capitalization.rb
git-lint-4.0.0 lib/git/lint/analyzers/commit_author_capitalization.rb