-
Notifications
You must be signed in to change notification settings - Fork 21
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
ex does not like rules including unused variables #4
Comments
Also, how open are you to contributions and ideas? I'd like to start using rf for some backwards-incompatible API changes across repos at work, as a sort of custom |
I'd be fine with changing unused variables into a warning rather than an error. |
@mdempsky thanks! Would a PR here be welcome, or is GitHub just a mirror? |
PR is fine. |
For example, the script below could be used to simplify obtaining a map key, rewriting
foo, _ := bar[idx]
intofoo := bar[idx]
:This fails, because the rule snippet alone does not use the declared variable. Perhaps we should turn off such "not used" errors when loading rules, or perhaps we should add a special way to write rules to match declarations. A special way could then also match
var foo, _ = bar[idx]
andfoo, _ = bar[idx]
, for example.The text was updated successfully, but these errors were encountered: