audit: match start of string, not line

This commit is contained in:
Dominyk Tiller 2017-05-02 19:30:41 +01:00
parent 80483c0206
commit 9aeb8f0f0b
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -511,7 +511,7 @@ class FormulaAuditor
reason.sub!(name, "")
first_word = reason.split[0]
if reason =~ /^[A-Z]/ && !reason.start_with?(*whitelist)
if reason =~ /\A[A-Z]/ && !reason.start_with?(*whitelist)
problem <<-EOS.undent
'#{first_word}' from the keg_only reason should be '#{first_word.downcase}'.
EOS