Add more guidelines
@@ -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_`.
|
||||
|
||||
Reference in New Issue
Block a user