Sha256: f7f9f80d630a1f65ad8b31292a512f371086645ed105b2e8db741806c7af6a48
Contents?: true
Size: 841 Bytes
Versions: 5
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer milestone value. class CommitTrailerMilestoneValue < Abstract include Import[setting: "trailers.milestone"] def valid? = affected_commit_trailers.empty? def issue return {} if valid? { hint: "Use: #{filter_list.to_usage "or"}.", lines: affected_commit_trailers } end protected def load_filter_list Kit::FilterList.new configuration.commits_trailer_milestone_value_includes end def invalid_line? trailer trailer.key.match?(setting.pattern) && !trailer.value.match?(value_pattern) end def value_pattern = /\A#{Regexp.union filter_list}\Z/ end end end end
Version data entries
5 entries across 5 versions & 1 rubygems