Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Naming/AsciiConstants #7458

Closed
pjskennedy opened this issue Oct 23, 2019 · 1 comment · Fixed by #8238
Closed

Request for Naming/AsciiConstants #7458

pjskennedy opened this issue Oct 23, 2019 · 1 comment · Fixed by #8238
Labels
stale Issues that haven't been active in a while

Comments

@pjskennedy
Copy link

Rubocop currently has Naming/AsciiIdentifiers which correctly adds offenses to ruby identifiers (tIDENTIFIER) containing non-ascii characters. I find that the same rigor should be applied to constants (tCONSTANT) as the following are currently not offenses:

class Foö
end
module Foö
end
FOÖ = "foo"

Possible Solution:

A new cop: Naming/AsciiConstants which adds offenses to code where non-ascii characters are used in constant declarations (See examples above)

Alternative:

A configuration option for Naming/AsciiIdentifiers to incorporate constants. Offenses would exist for the examples above. However it does not appear that ruby considers constants as identifiers so this option could be misleading.

@stale
Copy link

stale bot commented Apr 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label Apr 22, 2020
@koic koic closed this as completed in #8238 Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that haven't been active in a while
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant