Incorrect expectations for trailing whitespace
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
expanding on https://github.com/linebender/piet/issues/409#issuecomment-791806965:
I have been misunderstanding the intention of the "trailing whitespace" metric. This should not be about counting any and all whitespace at the end of a line, but rather the range of trailing whitespace that is not relevant for layout. A good heuristic for this is "whitespace the absence of which would not change the drawing of a selection that spans multiple lines".
For our purposes, this should also always include the trailing newline.
I think it's probably worth getting this in for the next piet release, which should be quite imminent.
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; begin by locating the implementation and expectations for the “trailing whitespace” metric in piet. Confirm that layout-irrelevant trailing whitespace includes the trailing newline and that removing it does not change drawing for a selection spanning multiple lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100