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

[Fix #8683] Make naming cops work with non-ascii characters #8693

Merged
merged 1 commit into from Sep 10, 2020

Conversation

tejasbubane
Copy link
Contributor

Closes #8683


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@marcandre
Copy link
Contributor

Good work, thanks!

@tejasbubane tejasbubane deleted the fix-8683 branch September 10, 2020 20:42
@bbatsov
Copy link
Collaborator

bbatsov commented Sep 10, 2020

I was going to say that I'd have this be configurable, as I don't want non-ascii characters in any names for various reasons. I guess you could have that the behaviour you changed was a feature, not a bug. :) Anyways, we can always adjust this later.

@marcandre
Copy link
Contributor

Sure, or there could be a cop for that...
This PR changed the definition of what is camel case vs snake case though, which is a concept that is valid for non-ascii characters.
I doubt there are much cases of unwanted non-ascii characters in codebases though.

@bbatsov
Copy link
Collaborator

bbatsov commented Sep 11, 2020

Well, I've worked on codebases where we had international teams and some people would name stuff in their language (e.g. German or French) instead of English and this caused some confusion and frustration. I can imagine some valid use-cases for non-ascii characters, but not that many of them. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Naming/MethodName false positive
3 participants