Sha256: 176b48a38266d94cf6543e21635c66738fb19fb96c441f5bda5c95a3bd76f2b9
Contents?: true
Size: 628 Bytes
Versions: 8
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes author name for minimum parts of name. class CommitAuthorName < Abstract def initialize commit, validator: Validators::Name super commit @validator = validator end def valid? = validator.new(commit.author_name, minimum:).valid? def issue return {} if valid? {hint: "Author name must consist of #{minimum} parts (minimum)."} end private attr_reader :validator def minimum = settings.minimum end end end end
Version data entries
8 entries across 8 versions & 1 rubygems