Sha256: dea23c86dd43f9f3ad193d74687ca69f9c6773948e6f31c408f59529717ce02f

Contents?: true

Size: 571 Bytes

Versions: 9

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Analyzers
      # Analyzes commit signature validity.
      class CommitSignature < Abstract
        include Import[sanitizer: "sanitizers.signature"]

        def valid?
          sanitizer.call(commit.signature).match?(/\A#{Regexp.union filter_list}\Z/)
        end

        def issue = valid? ? {} : {hint: %(Use: #{filter_list.to_usage "or"}.)}

        protected

        def load_filter_list
          Kit::FilterList.new settings.commits_signature_includes
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
git-lint-8.8.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.7.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.6.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.5.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.4.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.3.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.2.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.1.0 lib/git/lint/analyzers/commit_signature.rb
git-lint-8.0.0 lib/git/lint/analyzers/commit_signature.rb