From 5bc9f60f7f170d90bf11de4f6b6e9c966f86efcc Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Wed, 7 Dec 2022 19:29:44 +0000 Subject: [PATCH] doc: Update coding-style.rst with unneeded typedef in struct and enum --- doc/contributing/source/coding-style.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/contributing/source/coding-style.rst b/doc/contributing/source/coding-style.rst index c530031a3..c7e6d07a1 100644 --- a/doc/contributing/source/coding-style.rst +++ b/doc/contributing/source/coding-style.rst @@ -1151,6 +1151,22 @@ Miscellaneous items - Do not add the ``enum`` or ``struct`` specifiers when declaring the variable's type. +- Do not unnecessarily add ``typedef`` to ``struct`` or ``enum``. + + .. sourcecode:: cpp + + // Avoid + typedef struct + { + ... + } MyStruct; + + // Prefer + struct MyStruct + { + ... + }; + Clang-tidy rules ================