Stricter `Clippy` checks in CI
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
Now `datafusion` CI is using the default set of lint rules in `Clippy`, see https://github.com/apache/datafusion/blob/main/ci/scripts/rust_clippy.sh
Here is the `Clippy` doc for lint categories and levels https://doc.rust-lang.org/nightly/clippy/
There are several categories not enabled by default, and according to the `Clippy` doc, the reasons are they're 'annoying' for general codebases, or they have occasional false positives.
I think DataFusion is both performance and correctness-critical, and it also includes substantial complexity. Stricter lint checks could help improve code maintainability. We could hand-pick some useful optional lint rules and include them in the CI.
Clippy Lints list: https://rust-lang.github.io/rust-clippy/master/index.html
Here are some example lints that are not enabled now, but I think are useful:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
https://rust-lang.github.io/rust-clippy/master/index.html#todo
https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
## Tasks
- [ ] Figure out a list of suitable `Clippy` rules to enforce in datafusion
- [x] https://github.com/apache/datafusion/issues/18503
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with ci/scripts/rust_clippy.sh and compare its current Clippy invocation with the optional lint categories in the linked Clippy documentation. Review issue 18503 for the completed task, then evaluate suitable rules and their CI impact; done means an agreed set of rules is documented and enforced in CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100