Sha256: 6a9b1a17534969cfb747409068142996a9937f031ef6590c500c696747e69d5d
Contents?: true
Size: 767 Bytes
Versions: 14
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer milestone key usage. class CommitTrailerMilestoneKey < Abstract include Import[setting: "trailers.milestone"] def valid? = affected_commit_trailers.empty? def issue return {} if valid? { hint: "Use: #{filter_list.to_usage}.", lines: affected_commit_trailers } end protected def load_filter_list = Kit::FilterList.new setting.name def invalid_line? trailer trailer.key.then do |key| key.match?(setting.pattern) && !key.match?(/\A#{Regexp.union filter_list}\Z/) end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems