Skip to content

Commit 826a766

Browse files
Update README.md
1 parent 4c0d8f0 commit 826a766

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,34 @@ Common prefixes:
7373
- feat: A new feature
7474
- docs: Documentation changes
7575
- test: Correct existing tests or add new ones
76+
77+
#### Documentation
78+
- Make sure you put useful comments in your code. Do not comment things that are obvious.
79+
- 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.
80+
- If you have modified/added documentation, please ensure that your language is concise and contains no grammar errors.
81+
- Do not update 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
82+
83+
#### Test
84+
- Make sure to add examples and test cases in your main() function.
85+
- If you find any algorithm or document without tests, please feel free to create a pull request or issue describing suggested changes.
86+
87+
### Pull Requests
88+
- Checkout our [pull request template](https://github.com/TheAlgorithms/C-Plus-Plus-Algorithms/blob/master/.github/pull_request_template.md)
89+
90+
#### cpplint
91+
To see if [__cpplint__](https://github.com/cpplint/cpplint) is already installed, do:
92+
* `cpplint --version` # currently returns "cpplint 1.4.4"
93+
If cpplint is ___not___ installed then do:
94+
* `python3 -m pip install cpplint` # If that does not work then try...
95+
* `py -m pip install cpplint` # If that does not work then try...
96+
* `pip install cpplint`
97+
Once cpplint is installed, test your file(s) with:
98+
* `cpplint --filter=-legal my_file.cpp my_other_file.cpp` # Fix any issues and try again.
99+
100+
The [__clang-format__](https://clang.llvm.org/docs/ClangFormat.html) tool can fix whitespace related _cpplint_ issues.
101+
* On Macs only: `brew install clang-format` # Only needs to be installed once.
102+
* All platforms: `clang-format -i -style="{IndentWidth: 4}" my_file.cpp`
103+
104+
Most importantly,
105+
- Happy coding!
106+

0 commit comments

Comments
 (0)