-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(#297): New rule: Prefer Unquoted Atoms #355
feat(#297): New rule: Prefer Unquoted Atoms #355
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is fine, I would just simplify it by removing the options.
Once you're done with the code, @bormilan … you also need to add docs to this rule (in RULES.md) and you need to include it in the appropriate ruleset(s) (I guess |
Thanks for all the help and suggestions, currently I'm on a little vacation, but after that I will fix all of them and update the PR. |
Today I made some changes, but I had some questions that I commented on your suggestions above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few improvements and… I wonder what happens with 'maybe'
as an atom.
I checked erlang/otp's code and wherever there is a list of keywords/reserved words… they do not include maybe
, but I guess… if the feature is enabled (and I think it's enabled by default on OTP27+), that one should also be considered a keyword, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is perfectly fine, @bormilan … but I still believe this rule belongs to elvis_text_style
and not elvis_style
.
So, should we add "maybe" to the exceptions? I think we should. But because now it's not a keyword by default, we may wait and add it when erl/OTP27 comes. |
Personally… I would add it right now… It will be a reserved word soon enough. |
Excellent work, @bormilan !!! Thank you very much! |
Thank you so much for all the help and patience. It was a great start to my journey. |
I found a little problem, the formatter changes the |
@bormilan The list of exceptions should have strings and not atoms… that would fix it :) |
But… the formatter is broken, anyway… please report an issue there. |
I think |
Yeah, but it's not exported, is it? |
|
Ah, right! I was thinking of something like But… maybe we can actually use that here or in |
Ok, I will do it shortly! |
This is in an early stage, I have som things to fix.