Air isn't idempotent when `:=` expression is broken over multiple lines
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 446
- Forks
- 32
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 1
Description
Starting from this code:
y :=
# comment
a
After the first air format .:
y := # comment
a
After the second air format .:
y := a # comment
Tested with Air 0.10.0
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
Reproduce the issue with the multiline := example and run air format . twice to confirm that the output changes between runs. Trace the formatter handling of multiline assignments and comments; done means formatting the same input repeatedly produces identical output while preserving the intended comment placement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 63/100