Skip to content

Code style & Automatic Formatting

Wouter edited this page Oct 4, 2021 · 1 revision

Code Style

C-code style is enforced. e.g. each commit is being checked on code style format.

The code style that is being enforced is located at:

https://github.com/iotivity/iotivity-lite/blob/master/.clang-format

Automatic Formatting

When a pull request is created, and it fails on code style. Then add to a comment of the pull request the following text:

~format

The CI system will perform the auto formatter on the code of the pull request.

Ignoring Formatting in Code

The formatting can be ignored by placing code between //clang-format off and //clang-format on.