elvis_core
elvis_core copied to clipboard
New Rule: Parentheses in Macro Definitions
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).