From c926205fa73bfbc15fd184de512db7092daefe95 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 12 Nov 2024 15:46:20 +0100 Subject: update contributing.md --- contributing.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 3 deletions(-) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index a80f2b4..3090727 100644 --- a/contributing.md +++ b/contributing.md @@ -54,8 +54,6 @@ that you can click on to open them. - Implementation details (if applicable) - Header files (`.h`) contain the following types of comments: - [Usage documentation](#documentation) (required) - > [!NOTE] - > Constructors/destructors aren't required to have a `\brief` description - Implementation details (if they affect the header) - Design/data structure decisions (if applicable) -
@@ -436,7 +434,8 @@ that you can click on to open them. ```
-
- Variables that are being moved always use the fully qualified std::move + Variables that are being moved always use the fully qualified + std::move
GoodBad
```cpp @@ -666,6 +665,19 @@ that you can click on to open them. friend class ComponentManager; ```
+-
+ Do not pick fixed-width integer types (unless required) +
GoodBad
+ + ```cpp + unsigned long long foo(); + ``` + + + ```cpp + uint64_t foo(); + ``` +
## CMakeLists-specific @@ -716,6 +728,67 @@ that you can click on to open them. void foo(); ``` +-
+ The default constructor and destructor aren't required to have a + \brief description +
GoodBad
+ + ```cpp + Foo(); + virtual ~Foo(); + ``` + + + ```cpp + //! Create instance of Foo + Foo(); + //! Destroy instance of Foo + virtual ~Foo(); + ``` +
+-
+ Parameter direction shouldn't be specified using Doxygen +
GoodBad
+ + ```cpp + /** + * \param bar Reference to Bar + */ + void foo(const Bar & bar); + ``` + + + ```cpp + /** + * \param[in] bar Reference to Bar + */ + void foo(const Bar & bar); + ``` +
+-
+ Deleted functions shouldn't have Doxygen comments +
GoodBad
+ + ```cpp + // singleton + Foo(const Foo &) = delete; + Foo(Foo &&) = delete; + Foo & operator=(const Foo &) = delete; + Foo & operator=(Foo &&) = delete; + ``` + + + ```cpp + //! Deleted copy constructor + Foo(const Foo &) = delete; + //! Deleted move constructor + Foo(Foo &&) = delete; + //! Deleted copy assignment operator + Foo & operator=(const Foo &) = delete; + //! Deleted move assignment operator + Foo & operator=(Foo &&) = delete; + ``` +
# Libraries -- cgit v1.2.3