Sha256: 38fd96faa138e41981259397cd3e1c2c92cb9e692011bdf70d8745ed6038899b
Contents?: true
Size: 768 Bytes
Versions: 14
Compression:
Stored size: 768 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer tracker key usage. class CommitTrailerTrackerKey < 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 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