Skip to content
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

Suppress or fix clippy pedantic lints #126

Closed
vbrandl opened this issue Jun 13, 2023 · 1 comment · Fixed by #127
Closed

Suppress or fix clippy pedantic lints #126

vbrandl opened this issue Jun 13, 2023 · 1 comment · Fixed by #127

Comments

@vbrandl
Copy link
Contributor

vbrandl commented Jun 13, 2023

Running clippy with the pedantic lints (cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic) on a project using ructe will produce many errors. Most of them are like this:

error: used binding `_ructe_out_` which is prefixed with an underscore. A leading underscore signals that a binding will not be used

Would you prefer fixing the lints produced by clippy or allow all pedantic lints for the generated code (#[allow(clippy::pedantic)])?

@kaj
Copy link
Owner

kaj commented Jun 13, 2023

The _ructe_out_ this kind of "intentionally bad" to avoid accidentally having the same variable name used for somtehing in a template, but that is kind of a hack, maybe ructe_out_ without the preceding dash would be unlikely enough.

Or maybe i should #[allow()] the underscore for that specific variable? If so, only the specific lint should be allowed, not the whole "pedantic" group.

The other lints are probably just new lints I hadn't checked for yet (unless they come from the actual templates). I havn't really been that active in developing ructe the last year or so, but I should pick it up a bit, and PR:s are wellcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants