reformatting: reformat the entire repository
Marked as a draft as kwrobot checking needs deployed before this can truly land.
This MR adds configuration for the robot to use to enforce formatting across the entire repository using uncrustify
(version 0.78.x) and black
(version 24.x). The following exceptions are made:
- third party code (
rapidjson
andrapidxml
) -
sprokit
C++ code (it is already internally consistent and was 30+% of the C++ diff on its own)
There are a few "fix" commits to make the formatting with uncrustify
happy:
hiding usage of.template method<tmpl_arg>
syntax asuncrustify
does not support it (https://github.com/uncrustify/uncrustify/issues/4220)- one usage of
...
pack expansion that made it choke (https://github.com/uncrustify/uncrustify/issues/4223) - hiding of
for
loops with an empty init-stmt part asuncrustify
is unsure of whether a space should exist or not (https://github.com/uncrustify/uncrustify/issues/4221) - infinite loop in
pluggable.h
(https://github.com/uncrustify/uncrustify/issues/4219) - moving some end-of-line comments to be preceding line comments to avoid divergence like (https://github.com/uncrustify/uncrustify/issues/4222):
some long line content //
+ //
// word
+ //
// another
+ //
// line
where another set of empty comments are added on each reformat.
Edited by Ben Boeckel