|
| 1 | +# Contributing to GridShow |
| 2 | + |
| 3 | +## First setup |
| 4 | + |
| 5 | +1. You need [XenForo 2.x](https://xenforo.com/). You can setup a Scotch Box |
| 6 | + environment as described in the [Xenforo 2.x Development |
| 7 | + Documentation](https://xenforo.com/xf2-docs/dev/scotchbox/) |
| 8 | +2. Fork GridShow |
| 9 | +3. Move in the `src/addon/` folder of your development enviroment and `mkdir Inforge && cd Inforge` |
| 10 | +4. `git clone https://github.com/<your-username>/GridShow && cd GridShow` |
| 11 | +5. `git remote add upstream https://github.com/InforgeNet/GridShow` |
| 12 | + |
| 13 | +## Pull request |
| 14 | + |
| 15 | +Each time you want to submit a pull request, do the following: |
| 16 | + |
| 17 | +1. Download latest upstream modifications: `git fetch upstream` |
| 18 | +2. Ceate a new branch: `git checkout -b whatever-you-want-feature upstream/master` |
| 19 | +3. Make you changes, add them and commit |
| 20 | +4. `git push -u origin whatever-you-want-feature` |
| 21 | +5. Visit `https://github.com/<your-username>/GridShow` and create a new pull request |
| 22 | + |
| 23 | +### Commit message |
| 24 | + |
| 25 | +Follow these guidelines to write a proper commit message: [How to Write a Git |
| 26 | +Commit Message](https://chris.beams.io/posts/git-commit/). |
| 27 | + |
| 28 | +### Code style |
| 29 | + |
| 30 | +General guidelines: |
| 31 | + |
| 32 | +* Indent code with a **single tab** |
| 33 | +* Avoid brackets when they are not necessary |
| 34 | +* Try to keep lines under 80 columns, assuming a tab width equal to 8 spaces |
| 35 | + (yes!) |
| 36 | +* Follow the [XenForo 2.x](https://xenforo.com/xf2-docs/dev/) code style |
| 37 | + conventions |
| 38 | +* In general, I like the [Linux Kernel Coding |
| 39 | + Style](https://www.kernel.org/doc/html/latest/process/coding-style.html) and |
| 40 | + try to adapt it to PHP, JS and every other C-like language |
| 41 | +* Check out the code already in the repository and try to follow the same style |
| 42 | +* Use common sense |
0 commit comments