Closed jesperes closed 2 years ago
Hey @jesperes , thank you!
It's not actually a "bug" (maybe yes a desirable feature) since the ignore
pattern via rebar.config is
ignore ([file:filename_all() | {file:filename_all(), hank_rule:t() | [hank_rule:t()]} | {file:filename_all(), hank_rule:t() | [hank_rule:t()], list()}]):
What you can do to save this scenario is to set this in the module (hank_test.erl
) itself:
-hank([{unused_macros, ["FOO"]}]).
-hank([{unused_macros, ["FOO"]}]).
Yes, but this applies to many of our source files (they all include a common header file, and some of them use the macro, but many don't), and was hoping to avoid changing each of the source file.
But thanks for the quick reply, I'll figure out something.
Bug Description
Using the
ignore
option inrebar.config
to selectively disable some macros in some files (using wildcards) does not seem to work.To Reproduce
Given the following project:
Run
hank
:Expected Behavior
I would have expected
hank
to not reportFOO
as unused.Additional Context
hank
version 1.3.0