-
Notifications
You must be signed in to change notification settings - Fork 149
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
CI: Lint the crate and examples #671
Conversation
6f7495d
to
ea4d30d
Compare
Will I think we should try running
Which I think will cover the examples (though let me check..) and then gets us a bit of feature-matrix coverage as well. |
Yeah, confirmed that --all-targets will flag |
Interesting, then we (I) got it wrong in IIUC running the linter with different feature flags only adds checking unused imports when features are turned off, and while its nice to have these correct I'm not sure its worth bothering contributors with failing CI runs for it? EDIT: In hindsight this comment is dopey as hell :) |
ea4d30d
to
01a8642
Compare
I was wrong we get real errors with Here is an example error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lib.rs:757:37
|
757 | fn deref(&self) -> &T { &self.lock.deref() }
| ^^^^^^^^^^^^^^^^^^ help: change this to: `self.lock.deref()` |
clippy emits: error: this expression creates a reference which is immediately dereferenced by the compiler As suggested, remove the reference.
clippy emits: error: the following explicit lifetimes could be elided: 'a As suggested, remove the explicit lifetime.
We are not currently running the linter in CI, do so. Lint with three different feature combinations to get reasonable coverage.
01a8642
to
a410c06
Compare
Now includes two clippy fixes up front and uses the three feature gate combinations suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a410c06
We are not currently running the linter in CI, do so.