Sha256: 98830e474c461d742ce79d7b8b8e9257fbc182c7c3f44bdd6a28c757a25c67f0
Contents?: true
Size: 830 Bytes
Versions: 9
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer tracker value. class CommitTrailerTrackerValue < Abstract include Import[setting: "trailers.tracker"] def valid? = affected_commit_trailers.empty? def issue return {} if valid? { hint: "Use format: #{filter_list.to_usage}.", lines: affected_commit_trailers } end protected def load_filter_list Kit::FilterList.new settings.commits_trailer_tracker_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
9 entries across 9 versions & 1 rubygems