Sha256: e95f8406d1a98e715044363018eeea3921e36bd5db80fc42abbe68452294c9a9
Contents?: true
Size: 816 Bytes
Versions: 12
Compression:
Stored size: 816 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer signer name capitalization. class CommitTrailerSignerCapitalization < Abstract include Import[ pattern: "trailers.signer", parser: "parsers.person", validator: "validators.capitalization" ] def valid? = affected_commit_trailers.empty? def issue return {} if valid? { hint: "Name must be capitalized.", lines: affected_commit_trailers } end protected def invalid_line? trailer parser.call(trailer.value).then do |person| trailer.key.match?(pattern) && !validator.call(person.name) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems