Commit 4646e930 authored by Praetorius, Simon's avatar Praetorius, Simon

Update CONTRIBUTING.md

parent b23d88cd
......@@ -119,8 +119,9 @@ Implementation details are put into a subnamespace `Impl`. A few more subnamespa
of `AMDiS` are allowed, e.g., `Concepts`. If one of these subnamespaces need another
subsubnamespace for implementation details, it should be named `Impl_`.
## Line length
## Formatting
### Line length
Each line of text in your code should be at most 100 characters long.
**Exceptions:**
......@@ -128,9 +129,49 @@ Each line of text in your code should be at most 100 characters long.
* A raw-string literal may have content that exceeds 100 characters.
* ...
## Indentation
### Indentation
Use two spaces instead of tabs! Follow the formatting rules of the K&R style.
Use two spaces instead of tabs!
### Variable qualifiers
Use trailing `const`/`volatile` qualifiers for variables, e.g.
```c++
double const& d_ref = d;
```
### Functions
Try to put all parameters in the line of the function declaration until it exceeds
the maximum line length. Then list remaining arguments aligned with the first
function argument. Follow the style of the brackets, like
```c++
return_type function_name(Arg1 arg1, LongArgumentType longArgumentName,
Arg3 argument3)
{
// implementation of the function
}
```
### Classes
Put base-classes on a new line, do not indent labels, member variables are appended
with an underscore and follow the other formatting rules in the followign example:
```c++
template <class Type>
class SubClass
: public BaseClass
{
public:
SubClass(Arg1 arg1, Arg2 arg2)
: member1_(arg1)
, member2_(arg2)
{}
private:
Arg1 member1_;
Arg2 member2_;
};
```
## Documentation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment