Apply suggestions from code review
Co-authored-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
adf6278e3c
commit
c1009247bf
@ -74,9 +74,9 @@ module RuboCop
|
||||
desc_problem "Description shouldn't end with a full stop."
|
||||
end
|
||||
|
||||
# Check if the desc contains unicode characters in the So (emojis or other symbols) range.
|
||||
# Check if the desc contains Unicode characters in the So (emojis or other symbols) range.
|
||||
if regex_match_group(desc, /\p{So}/)
|
||||
desc_problem "Description shouldn't contain emojis or unicode characters in the So range."
|
||||
desc_problem "Description shouldn't contain emojis or Unicode characters in the So range."
|
||||
end
|
||||
|
||||
# Check if the desc length exceeds maximum length.
|
||||
|
||||
@ -113,7 +113,7 @@ describe RuboCop::Cop::Cask::Desc, :config do
|
||||
expect_offense <<~RUBY
|
||||
cask 'foo' do
|
||||
desc 'Description with a 🍺 symbol'
|
||||
^ Description shouldn't contain emojis or unicode characters in the So range.
|
||||
^ Description shouldn't contain emojis or Unicode characters in the So range.
|
||||
end
|
||||
RUBY
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ describe RuboCop::Cop::FormulaAudit::Desc do
|
||||
class Foo < Formula
|
||||
url 'https://brew.sh/foo-1.0.tgz'
|
||||
desc 'Description with a 🍺 symbol'
|
||||
^ FormulaAudit/Desc: Description shouldn't contain emojis or unicode characters in the So range.
|
||||
^ FormulaAudit/Desc: Description shouldn't contain emojis or Unicode characters in the So range.
|
||||
end
|
||||
RUBY
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user