Feature Request: minimum blank lines between fields with comments
Open
Nobody has claimed this yet.
A-comments
A-whitespace
C-feature-request
P-low
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
This can make structures with big field documentation more readable.
e.g.:
0:
struct Tets {
/// Doc
a: i32,
// Comment
b: i32,
c: i32,
/// Doc2
d: i32,
}
1:
struct Tets {
/// Doc
a: i32,
// Comment
b: i32,
c: i32,
/// Doc2
d: i32,
}
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
The issue names no files, tests, or entry points. Start by locating rustfmt's handling of comments and blank lines, then compare its behavior with the two Rust struct examples. Done means a configurable minimum blank-line setting produces the requested spacing around documented or commented fields without changing unrelated formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100