You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Rubocop::Cop::Style::ConstantName` enforces that constant names
must be written using SCREAMING_SNAKE_CASE, by comparing them to
its regex, `SNAKE_CASE`.
Capital letters can have accents, but the regular expression only
permits unaccented letters A-Z.
This modifies the regular expression to also permit capital
letters with accents using [POSIX character classes][], and adds a
spec confirming this behaviour.
Fixesrubocop#5016.
[POSIX character classes]: https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions#Character_classes
`Rubocop::Cop::Style::ConstantName` enforces that constant names
must be written using SCREAMING_SNAKE_CASE, by comparing them to
its regex, `SNAKE_CASE`.
Capital letters can have accents, but the regular expression only
permits unaccented letters A-Z.
This modifies the regular expression to also permit capital
letters with accents using [POSIX character classes][], and adds a
spec confirming this behaviour.
Fixes#5016.
[POSIX character classes]: https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions#Character_classes
Rubocop::Cop::Style::ConstantName
enforces that constant names must be written using SCREAMING_SNAKE_CASE, by comparing them to its regex,SNAKE_CASE
.Capital letters can have accents, but the regular expression only permits unaccented letters A-Z. We should also allow capital letters with accents.
Expected behavior
should be permitted by the cop, just as:
is permitted.
Actual behavior
Rubocop detects an offence.
Steps to reproduce the problem
Define a constant using what looks like SCREAMING_SNAKE_CASE, but including capital letterswith accents.
RuboCop version
The text was updated successfully, but these errors were encountered: