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

New Rule: Parentheses in Macro Definitions #152

Open
elbrujohalcon opened this issue Aug 7, 2020 · 0 comments
Open

New Rule: Parentheses in Macro Definitions #152

elbrujohalcon opened this issue Aug 7, 2020 · 0 comments

Comments

@elbrujohalcon
Copy link
Member

Ref: WhatsApp/erlfmt#91

  • Omit () in macro names only if they represent constants
%% Bad
-define(NOT_CONSTANT, application:get_env(myapp, key)).
-define(CONSTANT(), 100).
%% Good
-define(NOT_CONSTANT(), application:get_env(myapp, key)).
-define(CONSTANT, 100).
@elbrujohalcon elbrujohalcon transferred this issue from inaka/elvis Jan 7, 2021
@elbrujohalcon elbrujohalcon added this to the eventually 🙄 milestone May 26, 2022
@elbrujohalcon elbrujohalcon modified the milestones: eventually 🙄, 2.1.0 Feb 27, 2023
@elbrujohalcon elbrujohalcon modified the milestones: 3.0.0, 3.1.0 Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants