Sha256: 3ae00b5fc18dfb961cbadfe3533f697ca12a2ec523e11510d1f6f803d77ccb42
Contents?: true
Size: 834 Bytes
Versions: 12
Compression:
Stored size: 834 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer collaborator name capitalization. class CommitTrailerCollaboratorCapitalization < Abstract include Import[ pattern: "trailers.collaborator", 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