lib/git/lint/analyzers/commit_body_presence.rb in git-lint-2.2.1 vs lib/git/lint/analyzers/commit_body_presence.rb in git-lint-2.3.0
- old
+ new
@@ -2,11 +2,11 @@
module Git
module Lint
module Analyzers
class CommitBodyPresence < Abstract
- using Refinements::Strings
+ using GitPlus::Refinements::Strings
def self.defaults
{
enabled: true,
severity: :warn,
@@ -19,12 +19,10 @@
valid_lines = commit.body_lines.reject { |line| line.match?(/^\s*$/) }
valid_lines.size >= minimum
end
- def minimum
- settings.fetch :minimum
- end
+ def minimum = settings.fetch(:minimum)
def issue
return {} if valid?
{hint: %(Use minimum of #{"line".pluralize count: minimum} (non-empty).)}