Apply suggestions from code review

Co-authored-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Razvan Azamfirei 2023-06-20 08:59:01 -04:00 committed by GitHub
parent adf6278e3c
commit c1009247bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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

View File

@ -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