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

Allow blacklisted names in tests #2198

Open
mikeyhew opened this issue Nov 3, 2017 · 1 comment
Open

Allow blacklisted names in tests #2198

mikeyhew opened this issue Nov 3, 2017 · 1 comment

Comments

@mikeyhew
Copy link

mikeyhew commented Nov 3, 2017

Hi! First of all, great job with clippy to everyone involved. I just installed it and ran cargo clippy, and I like how seamlessly it runs – it's just like running cargo check, but with more lints.

One of the lints that I noticed is the lint for placeholder variable names like foo and bar. In general I think this is a great idea, but in the context of tests I think it should be turned off by default. I use foo and bar all the time in tests, and I don't think it's a problem there. Does anyone think otherwise?

@oli-obk
Copy link
Contributor

oli-obk commented Nov 3, 2017

Makes sense to me. Not sure how to solve it properly though. We can disable the lints via flags when cargo clippy is linting tests. For unit tests we'd need to add some way to prevent linting inside anything that has the #[test] attribute

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

No branches or pull requests

2 participants