Commit 8185137f authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Updated cintribution guidelines

parent 93724b6c
# GIT Workflow # GIT Workflow
Follow the ideas of [a-successful-git-branching-model](http://nvie.com/posts/a-successful-git-branching-model), Follow the git workflow:
especially
- Create a new branch for all new features, following the naming convention - Create a new branch for all new features, following the naming convention
`feature/XYZ` `feature/XYZ`
- Merge features in the `develop` branch only
- Correct Bugs in issue branches, following the naming convention `issue/XYZ` - Correct Bugs in issue branches, following the naming convention `issue/XYZ`
- Merge issues in the `develop` branch, except when it is a hotfix, then merge - For features and issues *Merge Request* into the master branch should be created in GitLab
to `master` and `develop` - Do not push into `master` directly
- For all merges create a meaningful *Merge Request* in GitLab - Releases are created in a new branch `release/VERSION` that is not deleted after merged into master.
After the merge, a tag with name `vVERSION` should be created.
# Code Style-Guide # Code Style-Guide
...@@ -44,24 +43,6 @@ files, such as `math.h` (remember that windows files-systems are case insensitiv ...@@ -44,24 +43,6 @@ files, such as `math.h` (remember that windows files-systems are case insensitiv
thus, there is no difference between `math.h` and `Math.H`.) thus, there is no difference between `math.h` and `Math.H`.)
## Generale file structure ## Generale file structure
Every header file should start with a copyright notice and an include guard `#pragma once`,
where the text of the copyright notice is given in the file `tools/license.templ.txt`
and can automatically by added, using the script files in the `tools` directory:
``` c++
// Software License for AMDiS
//
// Copyright (c) 2015 Institute for Scientific Computing, Technische Universitaet Dresden
// All rights reserved.
// Authors: Simon Praetorius
//
// This file is part of the AMDiS Library
// see also the LICENSE file in the distribution.
#pragma once
```
After the include guard a list of include files can be added, see *Names and Order of Includes*.
### Names and Order of Includes ### Names and Order of Includes
...@@ -84,9 +65,7 @@ For example, the includes in `io/VtkWriter.cpp` might look like this: ...@@ -84,9 +65,7 @@ For example, the includes in `io/VtkWriter.cpp` might look like this:
#include "io/VtkWriter.hpp" #include "io/VtkWriter.hpp"
// [open]mpi header // [open]mpi header
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include <mpi.h> #include <mpi.h>
#endif
// std c++ headers // std c++ headers
#include <cmath> #include <cmath>
...@@ -141,7 +120,7 @@ double const& d_ref = d; ...@@ -141,7 +120,7 @@ double const& d_ref = d;
### Functions ### Functions
Try to put all parameters in the line of the function declaration until it exceeds 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 the maximum line length. Then list remaining arguments aligned with the first
function argument. Follow the style of the brackets, like function argument. Follow the style of the brackets, like
```c++ ```c++
...@@ -166,7 +145,7 @@ public: ...@@ -166,7 +145,7 @@ public:
: member1_(arg1) : member1_(arg1)
, member2_(arg2) , member2_(arg2)
{} {}
private: private:
Arg1 member1_; Arg1 member1_;
Arg2 member2_; Arg2 member2_;
......
Supports Markdown
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