aspect-build / aspect-build/rules_lint
[FR]: Support formatting file with line level
- Dominant language
- Starlark
- Stars
- 154
- Forks
- 125
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 20
Description
### Feature Request
Support formatting file with line level.
Especially, could we support `clang-format-diff` for cpp?
### Motivation
When we adjust the formatting configuration, a lot of code needs to be reformatted, which can cause many git conflicts & compilation cache misses.
Therefore, we prefer to keep old code untouched, and new committed code should follow the latest formatting standards. This allows us to incrementally fix the formatting file by file.
For example, in the past, we use `clang-format-diff` to do the job.
```
git diff ${BASE_COMMIT} ${SOURCE_FILE} | clang-format-diff -p1 -i
```
Contributor guide
Research direction
Start by reproducing the issue's git diff ${BASE_COMMIT} ${SOURCE_FILE} | clang-format-diff -p1 -i example and inspect the repository's existing formatting integrations. Done means C++ formatting can be applied at line level so unchanged code remains untouched while newly committed code follows the current formatting configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, git
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100