-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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.