IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
0e36758c
Commit
0e36758c
authored
5 years ago
by
Ralf Ulrich
Browse files
Options
Downloads
Patches
Plain Diff
Some further changes.
parent
6b3834ef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CONTRIBUTING.md
+18
-6
18 additions, 6 deletions
CONTRIBUTING.md
with
18 additions
and
6 deletions
CONTRIBUTING.md
+
18
−
6
View file @
0e36758c
...
@@ -48,7 +48,7 @@ While `clang-format` does the structural formatting, we still need to agree on n
...
@@ -48,7 +48,7 @@ While `clang-format` does the structural formatting, we still need to agree on n
-
Classes and structs start with capital letters
```LikeThis```
-
Classes and structs start with capital letters
```LikeThis```
-
Class member variables start non-captial and have a trailing "_"
```likeThis_```
-
Class member variables start non-captial and have a trailing "_"
```likeThis_```
-
Class member functions start with small letters
```LikeThis::doSomething(...)```
-
Class member functions start with small letters
```LikeThis::doSomething(...)```
or
```LikeThis::do_something(...)```
-
Any class setter begins with "set_"
```LikeThis::set_something(...)```
-
Any class setter begins with "set_"
```LikeThis::set_something(...)```
-
Any class getter is named accoring to its property:
```LikeThis::something()```
-
Any class getter is named accoring to its property:
```LikeThis::something()```
-
Logical getters may start with
```is_```
or
```has_```
-
Logical getters may start with
```is_```
or
```has_```
...
@@ -56,13 +56,25 @@ While `clang-format` does the structural formatting, we still need to agree on n
...
@@ -56,13 +56,25 @@ While `clang-format` does the structural formatting, we still need to agree on n
-
Named variables start with small letter
```likeThis```
-
Named variables start with small letter
```likeThis```
-
types in template definitions start with "T"
```TLikeThis```
-
types in template definitions start with "T"
```TLikeThis```
-
use names that explain and document the code, thus
-
use names that explain and document the code, thus for example
```
```
TimeType TimeOfIntersection(Line const& line, Plane const& plane) {
auto const line_direction = line.GetDirection();
auto const plane_normal = plane.GetNormal();
return plane_normal.dot(plane.GetCenter()-line.GetPosition()) / plane_normal.dot(line_direction);
}
```
```
and not
and not
```
```
TimeType TimeOfIntersection(Line const& l, Plane const& p) {
auto const d = p.GetCenter() - l.GetR0();
auto const v = l.GetV0();
auto const n = p.GetNormal();
auto const c = n.dot(v);
return n.dot(d) / c;
}
```
```
This actually is suffient to document the code, no futher comments should be added in such case.
This actually is suffient to document the code, no fu
r
ther comments should be added in such case
s
.
Only if further clarification is needed.
-
We use namespaces to avoid clashes and to structure code
-
We use namespaces to avoid clashes and to structure code
-
*Everything*
is part of one of those namespaces:
-
*Everything*
is part of one of those namespaces:
...
@@ -98,13 +110,13 @@ While `clang-format` does the structural formatting, we still need to agree on n
...
@@ -98,13 +110,13 @@ While `clang-format` does the structural formatting, we still need to agree on n
-
Everything that does not need to be visible to the outside of a class/struct should be
`private`
or
`protected`
-
Everything that does not need to be visible to the outside of a class/struct should be
`private`
or
`protected`
-
We prefer the use of references, wherever useful
-
We prefer the use of references, wherever useful
-
There cannot be any pointer in the interface of any class or object
-
There cannot be any pointer in the interface of any class or object
exposed to outside users, there might be pointers for very special cases
exposed to outside users, there might be
(technical)
pointers for very special cases
inside of classes.
inside of classes.
-
When you contribute new code, or extend existing code, at the same time provide unit-tests for all functionality.
-
When you contribute new code, or extend existing code, at the same time provide unit-tests for all functionality.
-
When you contribute new physics algorithms, in addition you also need to provide a validation module (this is still TBD what exactly this means)
-
When you contribute new physics algorithms, in addition you also need to provide a validation module (this is still TBD what exactly this means)
-
Code must be documented with
`doxygen`
commands extensively -> MAKE THIS INVESTMENT OF YOUR TIME EARLY, IT REALLY HELPS
-
Code must be documented with
`doxygen`
commands extensively -> MAKE THIS INVESTMENT OF YOUR TIME EARLY, IT REALLY HELPS
-
There should not be any useless comments in code, in particular absolutely avoid to commit commented-out debug remnants
-
There should not be any useless comments in code, in particular absolutely avoid to commit commented-out debug remnants
- Add
(extensively)
meaningful comments to the code (only in English)
-
Add
sufficient and
meaningful comments to the code (only in English)
## CMAKE formatting
## CMAKE formatting
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment