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