Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
4646e930
Commit
4646e930
authored
May 24, 2018
by
Praetorius, Simon
Browse files
Update CONTRIBUTING.md
parent
b23d88cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
CONTRIBUTING.md
View file @
4646e930
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment