We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From erlang-ls/erlang_ls#1168
I've got the following macro:
% note the parens: -define(METRICS, (application:get_env(?APP, metrics_module, ?DEFAULT_METRICS_MODULE))). % ^ ^
...which I use like this:
notify_cache_hit() -> ?METRICS:increment(cache_hits).
When I run the formatter, it removes the parentheses, giving me this:
% this is wrong: -define(METRICS, application:get_env(?APP, metrics_module, ?DEFAULT_METRICS_MODULE)).
This is incorrect, and causes syntax error before: ':' errors when I attempt to use the macro.
syntax error before: ':'
I've confirmed that this happens with rebar3_format v1.0.1, outside of ErlangLS.
The text was updated successfully, but these errors were encountered:
Thanks for the report, @rlipscombe … It's likely related to #74 and #216.
Macros with code in them are generally a pain point for the formatter.
Also for code maintainers…
Sorry, something went wrong.
No branches or pull requests
From erlang-ls/erlang_ls#1168
I've got the following macro:
...which I use like this:
When I run the formatter, it removes the parentheses, giving me this:
This is incorrect, and causes
syntax error before: ':'
errors when I attempt to use the macro.I've confirmed that this happens with rebar3_format v1.0.1, outside of ErlangLS.
The text was updated successfully, but these errors were encountered: