Add leading zero when it is missing for decimals
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 446
- Forks
- 32
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 1
Description
It would be great if air could add a leading 0 for decimals when it is missing, so that this
.3 + .5
becomes this
0.3 + 0.5
Ruff (the formatter component, not the linter one) already does that and there's a PR in rustfmt to implement this (as an option) as well.
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 tracing the formatter entry point that handles decimal expressions; no file or test is named in the issue. Compare the requested .3 + .5 output with Ruff's behavior and the rustfmt option mentioned, then add coverage showing that missing leading zeros become 0.3 and 0.5.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100