Skip to content

Commit d54afc5

Browse files
[feat/fix]: Improve the contributing guidelines (TheAlgorithms#1503)
* [feat/fix]: Improve the contributing guidelines Mostly fix grammar, spelling errors, typos, and improves wording. * [docs]: Apply suggestions from code review * [feat/fix]: Minor improvements/fixes Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
1 parent 554919d commit d54afc5

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,54 @@
22

33
## Before contributing
44

5-
Welcome to [TheAlgorithms/C-Plus-Plus](https://github.com/TheAlgorithms/C-Plus-Plus)! Before submitting pull requests, please make sure that you have **read the whole guidelines**. If you have any doubts about this contribution guide, please open [an issue](https://github.com/TheAlgorithms/C-Plus-Plus/issues/new/choose) and clearly state your concerns.
5+
Welcome to [TheAlgorithms/C-Plus-Plus](https://github.com/TheAlgorithms/C-Plus-Plus)! Before submitting pull requests, please make sure that you have **read the whole guidelines**. If you have any doubts about this contribution guide, please open [an issue](https://github.com/TheAlgorithms/C-Plus-Plus/issues/new/choose) or ask in our [Discord server](https://discord.gg/c7MnfGFGa6), and clearly state your concerns.
66

77
## Contributing
88

99
### Contributor
1010

11-
We are very happy that you consider implementing algorithms and data structures for others! This repository is referred to and used by learners from around the globe. Being one of our contributors, you agree and confirm that:
11+
Being a contributor at The Algorithms, we request you to follow the points mentioned below:
1212

1313
- You did your own work.
1414
- No plagiarism allowed. Any plagiarized work will not be merged.
15-
- Your work will be distributed under [MIT License](License) once your pull request has been merged.
16-
- You submitted work fulfils or mostly fulfils our styles and standards.
15+
- Your work will be distributed under the [MIT License](https://github.com/TheAlgoritms/C-Plus-Plus/blob/master/LICENSE) once your pull request has been merged.
16+
- Please follow the repository guidelines and standards mentioned below.
1717

18-
**New implementation** New implementation are welcome!
18+
**New implementation** New implementations are welcome!
1919

20-
**Improving comments** and **adding tests** to existing algorithms are much appreciated.
20+
You can add new algorithms or data structures which are **not present in the repository** or that can **improve** the old implementations (**documentation**, **improving test cases**, removing bugs or in any other resonable sense)
2121

22-
**Issues** Please avoid opening issues asking to be "assigned” to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request and it will be evaluated by project maintainers.
22+
**Issues** Please avoid opening issues asking to be "assigned” to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request, and it will be evaluated by project maintainers.
2323

2424
### Making Changes
2525

2626
#### Code
2727

2828
- Please use the directory structure of the repository.
29-
- File extension for code should be `*.hpp`, `*.h` or `*.cpp`.
30-
- Don't use **bits/stdc++.h** because this is quite Linux specific and slows down the compilation process.
31-
- Organize your code using **`struct`**, **`class`** and/or **`namespace`** keywords
29+
- Make sure the file extensions should be `*.hpp`, `*.h` or `*.cpp`.
30+
- Don't use **`bits/stdc++.h`** because this is quite Linux-specific and slows down the compilation process.
31+
- Organize your code using **`struct`**, **`class`**, and/or **`namespace`** keywords
3232
- If an implementation of the algorithm already exists, please refer to the [file-name section below](#new-file-name-guidelines).
3333
- You can suggest reasonable changes to existing algorithms.
3434
- Strictly use snake_case (underscore_separated) in filenames.
3535
- If you have added or modified code, please make sure the code compiles before submitting.
36-
- Our automated testing runs [__CMake__](https://cmake.org/) on all pull requests so please be sure that your code passes before submitting.
37-
- Please conform to [doxygen](https://www.doxygen.nl/manual/docblocks.html) standard and document the code as much as possible. This not only facilitates the readers but also generates the correct info on website.
38-
- **Be consistent in use of these guidelines.**
36+
- Our automated testing runs [__CMake__](https://cmake.org/) on all the pull requests, so please be sure that your code passes before submitting.
37+
- Please conform to [Doxygen](https://www.doxygen.nl/manual/docblocks.html) standard and document the code as much as possible. This not only facilitates the readers but also generates the correct info on the website.
38+
- **Be consistent in the use of these guidelines.**
3939

4040
#### Documentation
4141

42-
- Make sure you put useful comments in your code. Do not comment things that are obvious.
42+
- Make sure you put useful comments in your code. Do not comment on obvious things.
4343
- Please avoid creating new directories if at all possible. Try to fit your work into the existing directory structure. If you want to create a new directory, then please check if a similar category has been recently suggested or created by other pull requests.
44-
- If you have modified/added documentation, please ensure that your language is concise and contains no grammar errors.
45-
- Do not update [`README.md`](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md) along with other changes. First create an issue and then link to that issue in your pull request to suggest specific changes required to [`README.md`](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md).
46-
- The repository follows [Doxygen](https://www.doxygen.nl/manual/docblocks.html) standards and auto-generates the [repository website](https://thealgorithms.github.io/C-Plus-Plus). Please ensure the code is documented in this structure. Sample implementation is given below.
44+
- If you have modified/added documentation, please ensure that your language is concise and must not contain grammatical errors.
45+
- Do not update [`README.md`](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md) along with other changes. First, create an issue and then link to that issue in your pull request to suggest specific changes required to [`README.md`](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md).
46+
- The repository follows [Doxygen](https://www.doxygen.nl/manual/docblocks.html) standards and auto-generates the [repository website](https://thealgorithms.github.io/C-Plus-Plus). Please ensure the code is documented in this structure. A sample implementation is given below.
4747

4848
#### Test
4949

50-
- Make sure to add examples and test cases in your main() function.
51-
- If you find any 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 expected output. Use `assert()` function to confirm that the tests will pass. Requires including the `cassert` header.
50+
- Make sure to add examples and test cases in your `main()` function.
51+
- 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.
5353

5454
#### Typical structure of a program
5555

@@ -130,7 +130,7 @@ int main(int argc, char *argv[]) {
130130
131131
#### New File Name guidelines
132132
133-
- Use lowercase words with ``"_"`` as separator
133+
- Use lowercase words with ``"_"`` as a separator
134134
- For instance
135135
136136
```markdown
@@ -139,8 +139,8 @@ my_new_cpp_class.cpp is correct format
139139
```
140140

141141
- It will be used to dynamically create a directory of files and implementation.
142-
- File name validation will run on docker to ensure the validity.
143-
- 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`.
142+
- File name validation will run on docker to ensure validity.
143+
- 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`.
144144

145145
#### New Directory guidelines
146146

@@ -158,7 +158,7 @@ some_new_fancy_category is correct
158158

159159
#### Commit Guidelines
160160

161-
- It is recommended to keep your changes grouped logically within individual commits. Maintainers find it easier to understand changes that are logically spilt across multiple commits. Try to modify just one or two files in the same directory. Pull requests that span multiple directories are often rejected.
161+
- It is recommended to keep your changes grouped logically within individual commits. Maintainers find it easier to understand changes that are logically spilled across multiple commits. Try to modify just one or two files in the same directory. Pull requests that span multiple directories are often rejected.
162162

163163
```bash
164164
git add file_xyz.cpp
@@ -216,14 +216,14 @@ clang-tidy --fix --quiet -p build subfolder/file_to_check.cpp --
216216
#### GitHub Actions
217217

218218
- Enable GitHub Actions on your fork of the repository.
219-
After enabling it will execute `clang-tidy` and `clang-format` after every push (not a commit).
219+
After enabling, it will execute `clang-tidy` and `clang-format` after every push (not a commit).
220220
- Click on the tab "Actions", then click on the big green button to enable it.
221221

222222
![GitHub Actions](https://user-images.githubusercontent.com/51391473/94609466-6e925100-0264-11eb-9d6f-3706190eab2b.png)
223223

224224
- The result can create another commit if the actions made any changes on your behalf.
225225
- Hence, it is better to wait and check the results of GitHub Actions after every push.
226-
- Run `git pull` in your local clone if these actions made many changes in order to avoid merge conflicts.
226+
- Run `git pull` in your local clone if these actions made many changes to avoid merge conflicts.
227227

228228
Most importantly,
229229

0 commit comments

Comments
 (0)