Tests for --file-lines
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
I think the existing formatting tests can be made to work for testing --file-lines.
Basically, what you can do is run diff between source/target, and identify the source lines that get formatted. Then use --file-lines to:
- only format those lines, check if it produces something identical to target
- only format lines that aren't those, check if it produces something identical to source
This may cover many of the cases @randomPoison has been finding.
There may be cleverer ways of doing this that cover more cases
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 by reading the existing formatting tests and the --file-lines handling, then use diff between each source and target to identify formatted lines. The work is done when tests verify that formatting only those lines reproduces the target and formatting the other lines reproduces the source across the relevant cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100