docs: update Contribution Guidelines

pull/146/head
Ming Tsai 2021-04-07 14:32:02 -04:00 committed by GitHub
parent 5ab719ce5e
commit 6d27728246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -3,7 +3,7 @@ Data structure and Algorithm (DSA)
## Contribution Guidelines
### **1. Contribution Specifications**
### 1. Contribution Specifications
The problem being contributed must either be a simple **file** (**Eg.** [`kruskal-algorithm.cpp`](https://github.com/MakeContributions/DSA/blob/main/graphs/c-or-cpp/kruskal-algorithm.cpp), [`linear-search.java`](https://github.com/MakeContributions/DSA/blob/main/searching/java/linear-search.java)) or a more complex **directory** ([`palindrome/`](https://github.com/MakeContributions/DSA/tree/main/strings/rust/palindrome)). This is a unit `problem`.
@ -18,11 +18,11 @@ A unit `problem` must conform to the following specifications:
2. To each new index file, write the readme with your `problem` in it ([Markdown Documentation](https://guides.github.com/features/mastering-markdown/)).
3. The folder name can also only contain **lowercase characters** and **dashes** or **hyphens** (`-`) (Eg. `strings` `sorting` etc.)
### Simple (File) Contributions
#### Simple (File) Contributions
The file should conform to the `problem` specification, and the extension (**Eg.** `linear-search.java`, `kruskal-algorithm.cpp`, `count-inversions.js` etc.)
### Project/Folder-based Contributions
#### Project/Folder-based Contributions
The project and folder-based contributions have a bit more stricter contribution contribution specifications.
@ -38,7 +38,7 @@ problem-name\
| - main.ext
```
#### - `README.md` Specification / Template
#### `README.md` Specification / Template
```markdown
# <Title of the Problem>
@ -61,14 +61,15 @@ problem-name\
< If you can provide test cases, describe it here, else remove this section >
```
#### - `.gitignore` File
#### `.gitignore` File
```gitignore
# add all output files and build files to be excluded from git tracking
main # executable file also must have the project name
target/ # the build file, for example for rust
```
#### - Build File / Specification File / Configuration File
#### Build File / Specification File / Configuration File
It can be any of the following ones
- **C/C++**: `Makefile`
- **Python**: `requirements.txt`
@ -76,13 +77,13 @@ It can be any of the following ones
- **Rust**: `Cargo.toml` and `Cargo.lock`
- **Go**: `go.mod`
### - Source Code File
#### Source Code File
The source code files, should either be in `src/` folder (**Eg.** `src/main.cpp` or `src/main.js`) or the root folder (**Eg.** `palindrome.go` or `App.java`) where `ext` is the file extension for the specific programming language.
Again, the source codes must conform to a valid file structure convention that the programming language enforces.
### **2. Naming Convention**
### 2. Naming Convention
The programming should keep the naming convention rule of each programming language.