Motate: A high-performance multi-architecture bare-metal framework that is easy to learn and easy to use.
We have standardized on clang-format
for pre-commit hook to ensure formatting.
Since Motate is often used as a sumbodule, use this incantation in order to install the hooks:
clang-format
which should also install the git-clang-format
utility.
brew install clang-format
ln -s ${PWD}/git-hooks/pre-commit `git rev-parse --git-dir`/hooks/pre-commit
Note: To prevent a section of code from being reformattted (say, you have some fancy ASCII art), then you can wrap it in clang-format off
... clang-format on
comments, like so:
// clang-format off
/* It's a goose!
* __
* >(' )
* )/
* /(
* / `----/
* jgs \ ~=- /
* ~^~^~^~^~^~^~^
*
*/
// clang-format on
Goose art found here with thanks!
Motate is shaping up quickly, but is still in heavy development. It is currently being developed and tested inside the Synthetos G2 project.
The interface for this code is still in flux. Before the Motate system is completed I'll freeze the interface.
Please share any suggestions for changes. Pull requests welcome as well.
Please see the Wiki.
-Rob