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

Macro used in header is reported as used only once #130

Closed
elbrujohalcon opened this issue May 21, 2021 · 0 comments · Fixed by #131
Closed

Macro used in header is reported as used only once #130

elbrujohalcon opened this issue May 21, 2021 · 0 comments · Fixed by #131
Assignees
Labels
bug Something isn't working started
Milestone

Comments

@elbrujohalcon
Copy link
Collaborator

Bug Description

If a macro is only used in the same header file where it's defined, it's reported as only used once. That is dumb since the way to solve that issue would be to move the macro to the place where it's used… which… well… it's the same actual place.

To Reproduce

Create this header file:

-define(ONE, 1).
-define(TWO, ?ONE + ?ONE).

Include it in two modules and use ?TWO in both of them.
Run rebar3 hank and you'll get…

===> The following pieces of code are dead and should be removed:
include/header.hrl:1: ?ONE is used only at include/header.hrl

Expected Behavior

No warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working started
Projects
None yet
1 participant