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

Bug (?) in atom_naming_convention #312

Open
paulo-ferraz-oliveira opened this issue Mar 17, 2023 · 2 comments
Open

Bug (?) in atom_naming_convention #312

paulo-ferraz-oliveira opened this issue Mar 17, 2023 · 2 comments
Labels

Comments

@paulo-ferraz-oliveira
Copy link
Collaborator

Bug Description

atom_naming_convention might be wrongly implemented (the default regex part).

I recently noticed non200_ was a possible atom / function_name, but this is probably undesired.

Now, if we fix it as per our initial intention (which was...?), it is a breaking change, so we'd need to bump major.

To Reproduce

Have non200_ in your code as an atom, or function name.

Expected Behavior

The regex should be improved, but also... why would non_200 not be accepted?

@elbrujohalcon
Copy link
Member

elbrujohalcon commented Mar 17, 2023

non_200 should be accepted. Let's improve the regex

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Yeah, tentatively I'm leaving this here: ^([a-z][a-z0-9]*(?:_[a-z0-9]+)*)(?:_SUITE)?$.

We force:

  • starting with [a-z]
  • potentially following with 0 or more [a-z0-9]
  • potentially following with 0 or more "_ forcefully followed by [a-z0-9]"
  • eventually ending in _SUITE

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

No branches or pull requests

2 participants