inaka / elvis

Erlang Style Reviewer
Apache License 2.0
424 stars 87 forks source link

Parser for rebar.config.script does not recognise previously defined variables #577

Open xurxodiz opened 8 months ago

xurxodiz commented 8 months ago

Running elvis on a rebar.config.script such as:

Vsn = 3.
[{minimum_otp_vsn, Vsn}].

throws an unbound_var exception on Vsn. Changing the period to a comma works around it, though for long files with many preparations it can be clunky to chain so many sentences that could be kept separate (rebar allows for this).

Nevertheless, this also happens for the explicitly available variables CONFIG and SCRIPT provided by rebar3 itself. They are also cause of an unbound_var error.