.clang-format gets picked up nowadays by some IDEs (tested Qt Creator)
for auto-formatting aids. With the large caveat that it's not 100%
accurate to labwc's preferred coding style, I've found that this config
gets it right 90% of the time, which is enough to be helpful.
I added a prominent disclaimer comment to the top of the file to warn
people away from relying completely on clang-format. This isn't meant
to replace manual attention to formatting details (or to replace
./scripts/check) but I think it doesn't hurt.
The files:
include/config/mousebind.h
src/config/mousebind.c
src/config/rc.xml
were formatted automatically via clang-format using the rules specified
in the .clang-format file. Specifically, the command;
clang-format -i -style=file include/config/mousebind.h \
src/config/mousebind.c src/config/rc.xml
This is unfortunately adding a break before the brace in enum
declarations