Sha256: 8401e1b9e3153af4bdd370339938a8d5773f504a32078da32ea4b5cca6c83d34
Contents?: true
Size: 878 Bytes
Versions: 14
Compression:
Stored size: 878 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer signer email address format. class CommitTrailerSignerEmail < Abstract include Import[ setting: "trailers.signer", 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