dense-analysis / dense-analysis/ale
Support using fixers (specifically clang-format) as a linter
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
I generally don't want to let code formatters loose on my code. However, I am interested in knowing when they think I'm doing something wrong. That helps let me get into good habits rather than relying on a formatter to sort things out.
clang-format has a dry-run option `-n` that just reports when things would be reformatted. The error messages aren't that helpful (they all say "`warning: code should be clang-formatted [-Wclang-format-violations]`") but it would be nice to have this as an ALE lint output where it just puts a note on the end of the line rather than having to run the fixer.
The way I would imagine using this:
```
let g:ale_linters = {'cpp': ['cppcheck', 'clang-format']}
```
Then I'd see this:
At the moment my work-around is to run it from the command-line, either with the dry-run option or (more commonly) outputting into a temporary file and using BeyondCompare to see what it thinks should change.
Contributor guide
Assessment
This issue has not been assessed yet.