-
Notifications
You must be signed in to change notification settings - Fork 87
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
Style rules for the seqbind transform #413
Comments
@gnuvince just curious: where do you get that parse_transform from? |
@elbrujohalcon It's an option for the compiler: http://erlang.org/doc/man/compile.html (scroll down a few screenfuls). |
I know what parse_transform is ;). I was asking where did you get this one (seqbind) in particular. |
Oops, misread, sorry! Here's their Github repo: https://github.com/spawngrid/seqbind |
Thanks. Please send a PR over with your rules, then :) |
PR submitted: inaka/elvis_core#67 The gadget/compiler check failed, but I'm not sure what the problem is. |
The seqbind parser transform allows Erlang code to reuse the "same" variable name multiple times:
Though useful sometimes, its usage is typically a code smell. I have created two new style rules (gnuvince/elvis_core#1):
no_seqbind
rule warns when a module declares its intention to use seqbind (-compile({parse_transform, seqbind}).
);no_useless_seqbind
rule warns when a module has activates the seqbind transform, yet never makes any use of it (i.e., noVar@
names anywhere in the module).The text was updated successfully, but these errors were encountered: