Sha256: dadf5e6e438ca880cbe7bb7d44740e3a61f5b42e8b169a32bbc6952fecd18270
Contents?: true
Size: 737 Bytes
Versions: 11
Compression:
Stored size: 737 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers class CommitAuthorEmail < Abstract def self.defaults { enabled: true, severity: :error } end def initialize commit:, settings: self.class.defaults, validator: Validators::Email super commit: commit, settings: settings @validator = validator end def valid? validator.new(commit.author_email).valid? end def issue return {} if valid? {hint: %(Use "<name>@<server>.<domain>" instead of "#{commit.author_email}".)} end private attr_reader :validator end end end end
Version data entries
11 entries across 11 versions & 1 rubygems