Skip to content
Commit 1e482dc2 authored by Martin Kojtal's avatar Martin Kojtal
Browse files

clang-format: Enable sorting includes

The priority order:

- Main Module Headers (the highest priority, on the top of the includes)
- iotsdk/hal Headers
- Local implementation Headers (included with "")
- System #includes, included with <> (the lowest priority)

Each of the item above represents own group. The headers are
alphabetically sorted within a group.

An example how sorted includes look like:

    ```
    #include "iotsdk/BlockDevice.h"
    #include "iotsdk/KVStore.h"
    #include "iotsdk/TDBStore.h"

    #include "common/align.h"
    #include "doubles/MockBlockDevice.h"
    #include "gmock/gmock.h"
    #include "gtest/gtest.h"

    #include <algorithm>
    #include <cstddef>
    ```

Notes:
- we treat gtest/gmock as any other local implementation
header included with `""`. LLVM style by default has own group for them.
- This grouping is inspired by
https://llvm.org/docs/CodingStandards.html#include-style



Signed-off-by: Martin Kojtal's avatarMartin Kojtal <martin.kojtal@arm.com>
parent 570c6f7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment