rust-lang / rust-lang/rust-clippy
struct-field-names, "why it is bad" section
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Description
https://rust-lang.github.io/rust-clippy/master/index.html#/struct_field_names
"
Why it is bad ?
Information common to all struct fields is better represented in the struct name.
"
However having just the name of the class in one field is reported. (as stated in "What it does")
I think it could be 2 separate lint. But in the current state, the "Why it is bad ?" should be made coherent with the "What it does" section, e.g. say why having the class name as prefix/suffix in one of the field is bad or "Field name should have the right amount of information, not less, not more"
Version
No response
Additional Labels
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked struct_field_names lint documentation and compare its “What it does” and “Why it is bad” sections. Revise the explanation so it matches the reported behavior, then check the rendered documentation for consistency; the issue also raises a possible split into two lints, but does not settle that design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100