Sha256: 60b625f5926dfd835e6d2a747fc0276a172ebc232b4f04748177804f5f75d0cc
Contents?: true
Size: 896 Bytes
Versions: 14
Compression:
Stored size: 896 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer collaborator email address format. class CommitTrailerCollaboratorEmail < Abstract include Import[ setting: "trailers.collaborator", parser: "parsers.person", validator: "validators.email" ] def valid? = affected_commit_trailers.empty? def issue return {} if valid? { hint: %(Email must follow name and use format: "<name@server.domain>".), lines: affected_commit_trailers } end protected def invalid_line? trailer email = parser.call(trailer.value).email trailer.key.match?(setting.pattern) && !validator.call(email) end private attr_reader :parser, :validator end end end end
Version data entries
14 entries across 14 versions & 1 rubygems