You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-12
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ Welcome to [TheAlgorithms/C-Plus-Plus](https://github.com/TheAlgorithms/C-Plus-P
6
6
7
7
## Contributing
8
8
9
+
### Maintainer/reviewer
10
+
11
+
**Please check the [reviewer code](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/REVIEWER_CODE.md) file for maintainers and reviewers.**
12
+
9
13
### Contributor
10
14
11
15
Being a contributor at The Algorithms, we request you to follow the points mentioned below:
@@ -49,7 +53,7 @@ You can add new algorithms or data structures which are **not present in the rep
49
53
50
54
- Make sure to add examples and test cases in your `main()` function.
51
55
- If you find an algorithm or document without tests, please feel free to create a pull request or issue describing suggested changes.
52
-
- Please try to add one or more `test()` functions that will invoke the algorithm implementation on random test data with the expected output. Use the `assert()` function to confirm that the tests will pass. Requires including the `cassert`header.
56
+
- Please try to add one or more `test()` functions that will invoke the algorithm implementation on random test data with the expected output. Use the `assert()` function to confirm that the tests will pass. Requires including the `cassert`library.
53
57
54
58
#### Typical structure of a program
55
59
@@ -58,23 +62,23 @@ You can add new algorithms or data structures which are **not present in the rep
58
62
* @file
59
63
* @brief Add one line description here
60
64
* @details
61
-
* This is a multiline
65
+
* This is a multi-line
62
66
* description containing links, references,
63
-
* math equations, etc
67
+
* math equations, etc.
64
68
* @author [Name](https://github.com/handle)
65
69
* @see related_file.cpp, another_file.cpp
66
70
*/
67
71
68
-
#include<cassert>
69
-
#include
72
+
#include<cassert>/// for assert
73
+
#include/// for `some function here`
70
74
71
75
/**
72
76
* @namespace <check from other files in this repo>
73
77
*/
74
78
namespacename {
75
79
76
80
/**
77
-
* Class documentation
81
+
*@briefClass documentation
78
82
*/
79
83
class class_name {
80
84
private:
@@ -86,7 +90,7 @@ class class_name {
86
90
}
87
91
88
92
/**
89
-
* Function documentation
93
+
*@briefFunction documentation
90
94
*@tparam T this is a one-line info about T
91
95
*@param param1 on-line info about param1
92
96
*@param param2 on-line info about param2
@@ -105,7 +109,7 @@ bool func(int param1, T param2) {
105
109
} // namespace name
106
110
107
111
/**
108
-
*@briefTest implementations
112
+
*@briefSelf-test implementations
109
113
*@returns void
110
114
*/
111
115
static void test() {
@@ -122,7 +126,7 @@ static void test() {
122
126
*@returns 0 on exit
123
127
*/
124
128
int main(int argc, char *argv[]) {
125
-
test(); // execute the tests
129
+
test(); // run self-test implementations
126
130
// code here
127
131
return 0;
128
132
}
@@ -139,7 +143,7 @@ my_new_cpp_class.cpp is correct format
139
143
```
140
144
141
145
- It will be used to dynamically create a directory of files and implementation.
142
-
- File name validation will run on docker to ensure validity.
146
+
- File name validation will run on Docker to ensure validity.
143
147
- If an implementation of the algorithm already exists and your version is different from that implemented, please use incremental numeric digit as a suffix. For example: if `median_search.cpp` already exists in the `search` folder, and you are contributing a new implementation, the filename should be `median_search2.cpp` and for a third implementation, `median_search3.cpp`.
144
148
145
149
#### New Directory guidelines
@@ -196,15 +200,15 @@ cmake -B build -S .
196
200
197
201
#### Static Code Analyzer
198
202
199
-
We use [clang-tidy](https://clang.llvm.org/extra/clang-tidy/) as a static code analyzer with a configuration in [.clang-tidy](.clang-tidy).
203
+
We use [`clang-tidy`](https://clang.llvm.org/extra/clang-tidy/) as a static code analyzer with a configuration in [`.clang-tidy`](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/.clang-tidy).
0 commit comments