rust-lang / rust-lang/rust-bindgen

OCD: clippy issues

Open
#3,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Here's the statistics of the Clippy issues to see which may need to be fixed. I excluded bindgen-integration and tests_expectations as they seem to have some other issues.

echo '|count|lint|' && echo '|---|---|' && \
   cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations --message-format=json --quiet -- -W clippy::pedantic \
    | jq -r '.message.code.code | select(. != null and startswith("clippy::")) | "| [" + . + "](https://rust-lang.github.io/rust-clippy/master/index.html#" + .[8:] + ") |"' \
    | sort | uniq -c | sort -h -r | sed 's/^/|/' 
count lint fixes
271 clippy::doc_markdown #3026
226 clippy::return_self_not_must_use
183 clippy::unreadable_literal
156 clippy::must_use_candidate
54 clippy::too_many_lines
47 clippy::default_trait_access
46 clippy::manual_let_else #3019
44 clippy::trivially_copy_pass_by_ref
40 clippy::needless_pass_by_value
40 clippy::match_same_arms
40 clippy::ignored_unit_patterns
34 clippy::redundant_closure_for_method_calls
34 clippy::cast_possible_truncation
33 clippy::single_match_else #3019
32 clippy::explicit_iter_loop #3020
28 clippy::cast_lossless #3021
26 clippy::items_after_statements
26 clippy::cast_sign_loss
24 clippy::used_underscore_binding
20 clippy::wildcard_imports
17 clippy::if_not_else #3022
16 clippy::map_unwrap_or #3023
16 clippy::implicit_hasher
12 clippy::unused_self
12 clippy::missing_errors_doc
11 clippy::unnested_or_patterns
10 clippy::unnecessary_wraps
10 clippy::struct_excessive_bools
10 clippy::module_name_repetitions
10 clippy::cast_possible_wrap
9 clippy::missing_panics_doc
6 clippy::ptr_as_ptr
6 clippy::case_sensitive_file_extension_comparisons
4 clippy::struct_field_names
4 clippy::redundant_else
3 clippy::manual_string_new
3 clippy::enum_glob_use
2 clippy::similar_names
2 clippy::range_plus_one
2 clippy::maybe_infinite_iter
2 clippy::match_wildcard_for_single_variants
2 clippy::match_bool
2 clippy::manual_instant_elapsed
2 clippy::inconsistent_struct_constructor
2 clippy::flat_map_option
2 clippy::explicit_into_iter_loop
2 clippy::checked_conversions
2 clippy::cast_precision_loss
2 clippy::borrow_as_ptr
1 clippy::should_panic_without_expect
1 clippy::manual_assert

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the cargo clippy command in the issue, keeping the listed exclusions, and review the linked Clippy lint documentation. The issue identifies existing work in #3026 and #3019–#3023; done would require resolving an agreed subset of the remaining reported lints without changing the excluded targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.