Document code formatter.
@gedare has worked quite hard to provide an excellent RTEMS-style formatting tool using Clang-Format.
Some of this initial work can be seen in rtems/rtos/rtems!238 and rtems/rtos/rtems!237
We need to document:
- How the tool is used.
-
@chris has suggested we create some new commands
waf format
andwaf format-check
to handle running the tool.
-
@chris has suggested we create some new commands
- What rules we apply when deciding to turn formatting off for a code block.
- What files the formatter is run on. @joel has suggested we disable it for inline ASM heavy files but maybe we can get away with disabling blocks.
- Disabled files should be disabled at the top of the file so there is awareness the files are not auto-formatted and it simplifies that we can just run the tool over all source.
The second point above is mostly what this issue is about.