Sha256: c6a2611ceeeb4ac7fe87784b606cffce4b9f226d83d879dedf5559f9ae71e8ec
Contents?: true
Size: 819 Bytes
Versions: 6
Compression:
Stored size: 819 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit trailer issue key usage. class CommitTrailerIssueKey < Abstract include Import[pattern: "trailers.issue"] 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 configuration.commits_trailer_issue_key_includes end 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