Closed Pedro-Giorgiano closed 5 months ago
👋
What elvis.config
are you using?
I cannot replicate your issue by doing:
rebar3
lib, using rebar3 new lib
rebar3_lint
to plugins
in rebar.config
rebar3 lint
Maybe an example repo. where the issue is apparent in e.g. CI would help us debug further.
Edit: I can partially replicate your issue if I introduce an elvis.config
. On the other hand, removing -feature(
makes the issue go away. Do you need to run the code under OTP 25, or any other specific version?
Hello!! I created a repository to exemplify the problem, the elvis.config is there if you want to take a look: https://github.com/Pedro-Giorgiano/maybeEndExample
Apparently if we add the match with empty strings in the atom related regex, the warning disappears
"^$|^[a-z]([a-zA-Z0-9@]*_?)*(_SUITE)?$"
This is katana-code
giving us this result, as an atom node:
{line,#{type=>atom,attrs=>#{value=>non_reversible_form,location=>{-1,-1},text=>[]}}}
from which we extract line -1
(from location
) and text []
.
First time I see that non_reversible_form
thingy. (Not happening in the near future, but) I'll have to update my knowledge on Erlang's AST at some point.
Bug Description
During
rebar3 lint
I got a warning on line -1 which is related to themaybe ... end
clauseTo Reproduce
Expected Behavior
no warning on line -1
rebar3
LogsAdditional Context