Class: Poper::Rule::Generic

Inherits:
Rule
  • Object
show all
Defined in:
lib/poper/rule/generic.rb

Constant Summary collapse

MSG =
'Consider writing a more detailed, not as generic, commit message'
GENERIC =
%w(fix fixed fixes oops todo fixme commit changes hm hmm hmmm
test tests quickfix)

Instance Method Summary collapse

Methods inherited from Rule

all, inherited

Instance Method Details

#check(message) ⇒ Object



8
9
10
11
# File 'lib/poper/rule/generic.rb', line 8

def check(message)
  words = message.scan(/[\w-]+/).compact
  MSG if words.all? { |word| generic?(word) }
end