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

consider passing --cfg test by default #12

Open
durka opened this issue Jan 7, 2016 · 1 comment
Open

consider passing --cfg test by default #12

durka opened this issue Jan 7, 2016 · 1 comment

Comments

@durka
Copy link
Contributor

durka commented Jan 7, 2016

Regular cargo clippy doesn't check #[test] functions because it can't (the code is gone by the time the lints run). But if you do cargo clippy -- --cfg test it works. I wonder if there are any downsides to making this the default behavior.

@durka
Copy link
Contributor Author

durka commented Jan 7, 2016

I guess this breaks people who have #[cfg(not(test))] on things. But perhaps cargo-clippy can support a --test flag which would be a bit shorter than -- --cfg test.

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

1 participant