We just updated the version from 14 to 16. But very unfortunately
clang-format-16 was just deprecated recently. So this time we update
the version to the latest available one. There are newer releases than
19 (like 20) but as I tested, sudo apt-get install -y clang-format-19
can work while 20 doesn't work.
misc-include-cleaner in clang-tidy-19 exerts a very strict check which
requires to directly include all headers for every symbols in the
source file. However in our current code we intentionally use some
indirect include. So this commit disables misc-include-cleaner.
This commit simplifies the config header files includes in
OpenThread core and non-public source files. With this change the
"openthread-core-config.h" becomes the main config header file. This
header file includes all other config ones:
1) The `configure` generated `<openthread/config.h>;
2) The project specific one by `OPENTHREAD_PROJECT_CORE_CONFIG_FILE`;
3) The "openthread-core-default-config.h" defining default settings.
With the change in this commit, all header files include "openthread-
core-config.h" as the first `#include`, and in `.cpp` files, the first
`#include` continues to be the unit's corresponding header file. The
new model ensures that the configuration settings are visible and
consistent in all the source files. This commit also updates the
style guide document accordingly.