Skip to content

Commit

Permalink
update contrib guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhupesh-V committed Oct 8, 2020
1 parent 078db31 commit a924b70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 43 deletions.
21 changes: 12 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Welcome :smile:
### To start contributing, follow these steps :point_down::

1. [Star](https://help.github.com/en/articles/about-stars) :star: the repository.
1. [Star](https://help.github.com/en/articles/about-stars) :star: the repository (not necessary but it helps maintainers).
2. [Fork](https://help.github.com/en/articles/fork-a-repo) :fork_and_knife: it.
3. Create [Branch](https://help.github.com/en/articles/about-branches) :herb: with your feature `<feature>`.
4. [Push](https://help.github.com/en/articles/pushing-to-a-remote) changes.
Expand All @@ -14,11 +14,13 @@
- [map](https://github.com/Bhupesh-V/30-seconds-of-cpp/tree/master/map)
- [vector](https://github.com/Bhupesh-V/30-seconds-of-cpp/tree/master/vector)
- [queue](https://github.com/Bhupesh-V/30-seconds-of-cpp/tree/master/queue)
- [priority_queue](https://github.com/Bhupesh-V/30-seconds-of-cpp/tree/master/priority_queue)
- [unordered_map](https://github.com/Bhupesh-V/30-seconds-of-cpp/tree/master/unordered_map)
7. If you are feeling confused on what to contribute, head over to [Projects](https://github.com/Bhupesh-V/30-seconds-of-cpp/projects), select the directory you want to contribute to for e.g choose `<algorithm>` & from the **Algorithms To Implement** column select any one method.You can either submit a small C++ code snippet demonstrating the same in the `snippets` directory or submit a overview of the choosen method in `<name_of_directory>` see for example [all_of.md](https://github.com/Bhupesh-V/30-seconds-of-cpp/blob/master/algorithm/all_of.md).
8. Always follow the style guide(see below).
9. Do not update any `README` or `todo.txt` files (unless you find a typo :sweat_smile:)
9. Enjoy contributing :yum:.
10. If you have any doubts, open an [issue](https://github.com/Bhupesh-V/30-seconds-of-cpp/issues/new).
8. Always follow the [style guide](https://github.com/Bhupesh-V/30-seconds-of-cpp/blob/master/CONTRIBUTING.md#style-guide).
9. Do not update any `README.md` or `todo.txt` files (unless you find a typo 😅)
10. Enjoy contributing!.
11. If you have any doubts, open an [issue](https://github.com/Bhupesh-V/30-seconds-of-cpp/issues/new).

For adding functions in different directories, use the following template (copy from raw format):

Expand All @@ -45,6 +47,7 @@ For adding functions in different directories, use the following template (copy
---
# Style Guide
Follow this style guide to add sample programs:
1. Naming Style:
Expand Down Expand Up @@ -81,7 +84,7 @@ Follow this style guide to add sample programs:
5. Add appropriate comments wherever necessary to explain the code.
> Programs wth NO Comments at all will not be merged.
6. Expression should be readable, Use 1 space between different TOKENS.
6. Expression should be readable, Use 1 space between different tokens.
```cpp
galaxy=stars+asteroids // ❌
galaxy = stars + asteroids // ✅.
Expand All @@ -93,14 +96,14 @@ Follow this style guide to add sample programs:
std::cout << i << " "; //

for (int i = 0;i < 45; ++i){
std::cout << i <<" "; // ✅.
std::cout << i << " "; // ✅.
}
```
8. Always use pre-increment(++i) while looping instead of post-increment(i++).
8. Always use pre-increment(++i) in loops instead of post-increment(i++).
9. When submitting `markdown` files of methods in different directories, name your file exactly as the function/method name. For example `push_back.md`, `swap.md` etc.
10. Always use prefix ```std::``` for functions and types from the std namespace, either on the `markdown` files and on the snippets files.
10. Always use prefix ```std::``` for functions and types from the std namespace, either on the `markdown` files or on the snippet code files.
```cpp
using namespace std; // ❌
vector<int> ...; // ❌
Expand Down
34 changes: 0 additions & 34 deletions Deque.cpp

This file was deleted.

0 comments on commit a924b70

Please sign in to comment.