From 01ca4b2fa8c0687cbb689ba829dde2f6b798f660 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 21 Jan 2026 02:40:32 +0100 Subject: [PATCH] Add more guidelines --- Coding-Guidelines.md | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/Coding-Guidelines.md b/Coding-Guidelines.md index 454e7e9..f807723 100644 --- a/Coding-Guidelines.md +++ b/Coding-Guidelines.md @@ -7,3 +7,59 @@ recommendations. ## Git Master Branch The master branch will always be called `master`. This is final. + +## Versioning + +Most Art projects are implemented in C++ and use the build2 build-system. See +https://build2.org/build2/doc/build2-build-system-manual.xhtml#module-version +for information about versioning. + +## Feature Branches + +Feature branches are prefixed with `feature/`. + +## Release Branches + +Release branches are prefixed with `release/v`. + +## Release Tags + +Release tags are prefixed with `v`. + +# C++ Guidelines + +## Namespaces + +Namespaces shall be named using PascalCase, for example `namespace Art::Seafire`. + +## Classes + +Classes shall be named according to the Stroustrup PPP-style. For example +`class Temperature_reading`. + +## Functions + +Functions, both member functions and free functions, shall be named using snake +case. For example: `void register_user()`. + +## Enumerations + +Enumerations shall be named like classes. Members of an enumeration shall +be named using PascalCase, with a lower-case `k`-prefix. For example: + +```c++ +enum class Enumeration +{ + kEnum1, + kEnum2 + +}; +``` + +## Include Guards + +Include guards shall consist of the complete path of the header file, relative +to the project root. With `__` used as a directory separator. + +For example, for `art/seafire/version.hxx`, the include guard should be: +`#ifndef art__seafire__version_hxx_`.