25 Commits

Author SHA1 Message Date
Yakun Xu 0fb573177c [style] upgrade yapf to the latest version (#12169)
This commit upgrades yapf which fixes the issue of deprecated lib2to3.
2025-11-19 08:14:33 -08:00
Li Cao 318006e4da [format] standardize clang-format to 19.1.7 (#11797)
Since llvm-19, if we use package manager to install it, the minor
versions could be different. This commit standardizes the version on
linux to 19.1.7. This version is the same as the one installed by
homebrew.
2025-08-12 11:20:30 -07:00
Li Cao 8dadae2ea1 [format] upgrade clang-format to 19 (#11783)
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.
2025-08-06 10:49:52 -07:00
Li Cao 6c6e99ee7c [style] upgrade clang-format and clang-tidy from 14 to 16 (#11682) 2025-07-10 18:19:26 -07:00
Jonathan Hui 351298e85f [clang-format] update to v14 (#8490) 2022-12-07 16:23:20 -08:00
Sarah 9e161b96b5 [documentation] update code comments and contributing section (#7240) 2021-12-22 13:11:33 -08:00
Simon Lin d5855ab74b [style] bump yapf version to 0.31.0 (#6434) 2021-04-12 07:30:27 -07:00
Jonathan Hui 0eecd1c481 [pretty] downgrade to clang-format/tidy v9.0 (#5761) 2020-11-03 07:17:05 -08:00
Jonathan Hui 58b0486bcd [clang-format] update to clang-format-10 (#5616) 2020-10-07 21:17:44 -07:00
Simon Lin d7343c877b [style] change python yapf column_limit to 119 (#5339) 2020-08-06 21:40:24 -07:00
Jonathan Hui d81d769e68 [style] advance C++ language standard to C++11 (#5077) 2020-06-16 13:02:53 -07:00
Jonathan Hui 082f7e9fdc [docs] apply prettier changes (#4881) 2020-04-24 16:22:00 -07:00
Jonathan Hui c0075d42c3 [pretty] fix yapf version to 0.29.0 (#4880)
v0.30.0 (released on 2020-04-23) introduces formatting changes that
are not compatible with v0.29.0.
2020-04-23 17:14:58 -07:00
Jonathan Hui 4ee8010558 [script] update make-pretty to bash (#4698)
- Also update CONTRIBUTING.md and STYLE_GUIDE.md.
2020-03-18 19:04:10 -07:00
Yakun Xu 33808ebfba [style] apply google python style guide (#4501)
This commit applies and enforces Google's python style for tests.
2020-02-04 10:27:50 -08:00
Jonathan Hui 43be2b821f [tests] require python3 and drop support for python2 (#4220) 2019-10-04 11:03:58 -07:00
Jonathan Hui 5ca9db0035 [style] remove snake case from style guide (#3586)
For better or worse, the existing C code style follows camel case. Rather
than changing the code, simply update the style guide.
2019-02-14 13:09:00 -08:00
Jonathan Hui cd2521f53a [style] add use of OT_UNUSED_VARIABLE (#3299) 2018-11-17 12:04:41 -08:00
Jonathan Hui 5e4be05907 [style] change to clang-format-6.0 (#3222) 2018-10-29 12:38:06 -07:00
Jonathan Hui 4a30a1cbb4 [docs] explicitly mention clang-format v5.0.1 requirement (#2572) 2018-02-21 16:47:54 +00:00
Abtin Keshavarzian 2ea56446a4 [config-header] simplify config header file includes (#2255)
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.
2017-10-17 09:46:34 -07:00
Abtin Keshavarzian d4e6b8302e [docs] fix typos in comments and variable name (#2132) 2017-08-24 11:27:05 -07:00
Jonathan Hui ea95d84aa1 [style-guide] note that openthread/config.h must appear first (#2066) 2017-08-04 23:41:16 -07:00
Jonathan Hui 1eabda6a08 Change top-level namespace from 'Thread' to 'ot'. (#1664) 2017-04-27 22:29:05 -07:00
Jonathan Hui f6ff6fcd85 Initial OpenThread style guide. (#1490) 2017-03-21 21:47:49 -07:00