lib/git/lint/analyzers/commit_subject_suffix.rb in git-lint-2.4.0 vs lib/git/lint/analyzers/commit_subject_suffix.rb in git-lint-3.0.0

- old
+ new

@@ -1,23 +1,12 @@ # frozen_string_literal: true module Git module Lint module Analyzers + # Analyzes commit subject suffix for punctuation. class CommitSubjectSuffix < Abstract - def self.defaults - { - enabled: true, - severity: :error, - excludes: [ - "\\.", - "\\?", - "\\!" - ] - } - end - def valid? return true if filter_list.empty? !commit.subject.match?(/#{Regexp.union filter_list.to_regexp}\Z/) end @@ -28,10 +17,10 @@ {hint: %(Avoid: #{filter_list.to_hint}.)} end protected - def load_filter_list = Kit::FilterList.new(settings.fetch(:excludes)) + def load_filter_list = Kit::FilterList.new(settings.excludes) end end end end