Is it possible to have clang-format issue output as warnings saying what to fix similar to clang tidy. I would prefer to use clang-format due to the ease of setting up styles.
Asked
Active
Viewed 521 times
1 Answers
0
Clang-format has the -output-replacements-xml
option.
The xml output will tell you what changes and where to apply. You can then use it raw or parse it in any way that suits you.
Sample:
<?xml version='1.0'?>
<replacements xml:space='preserve' incomplete_format='false'>
<replacement offset='337' length='8'> </replacement>
</replacements>
....etc

pablo285
- 2,460
- 4
- 14
- 38