|
1 | | -Contributing |
2 | | ------------- |
| 1 | +# Contributing |
3 | 2 |
|
4 | | -Gherkin is an open source, community-driven project. If you'd like to contribute, feel free to do this, but remember to follow this few simple rules: |
| 3 | +Gherkin is an open source, community-driven project. If you'd like to contribute, feel free to do this, but remember to |
| 4 | +follow this few simple rules: |
5 | 5 |
|
6 | 6 | - Make your feature addition or bug fix, |
7 | 7 | - Always use the `master` branch as base for your changes (all new development happens in `master`), |
8 | | -- Add tests for those changes (please look into `tests/` folder for some examples). This is important so we don't break it in a future version unintentionally, |
9 | | -- Commit your code, but do not mess with `CHANGES.md`, |
10 | | -- __Remember__: when you create Pull Request, always select `master` branch as target (done by default), otherwise it will be closed. |
| 8 | +- Add tests for those changes (please look into `tests/` folder for some examples). This is important so we don't break |
| 9 | + it in a future version unintentionally, |
| 10 | +- Commit your code, but do not mess with `CHANGELOG.md`, |
| 11 | +- _Remember_: when you create a Pull Request, always select `master` branch as target (done by default), otherwise it |
| 12 | + will be closed. |
11 | 13 |
|
12 | | -Running tests |
13 | | -------------- |
| 14 | +## Running tests |
14 | 15 |
|
15 | 16 | Make sure that you don't break anything with your changes by running: |
16 | 17 |
|
17 | | -```bash |
18 | | -$> phpunit |
| 18 | +```shell |
| 19 | +composer test |
19 | 20 | ``` |
20 | 21 |
|
21 | | -Contributing to Gherkin Translations |
22 | | ------------------------------------- |
| 22 | +## Running Linters |
23 | 23 |
|
24 | | -Gherkin supports →40 different languages and you could add more! You might notice |
25 | | -`i18n.php` file in the root of the library. This file is downloaded and **autogenerated** |
26 | | -from original [cucumber/gherkin translations](https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json). |
27 | | -So, in order to fix/update/add some translation, you should send Pull Request to the |
28 | | -`cucumber/gherkin` repository. `Behat\Gherkin` will redownload/regenerate translations |
29 | | -from there before each release. |
| 24 | +We use automated tools to ensure that the code has a consistent style and is of good quality. |
30 | 25 |
|
31 | | -It might sounds difficult, but this way of dictionary sharing gives you ability to |
32 | | -migrate your `*.feature` files from language to language and library to library without |
33 | | -the need to rewrite/modify them - same dictionary (Gherkin) used everywhere. |
| 26 | +```shell |
| 27 | +composer lint |
| 28 | +``` |
| 29 | + |
| 30 | +## Contributing to Gherkin Translations |
| 31 | + |
| 32 | +Gherkin supports →40 different languages and you could add more! You might notice `i18n.php` file in the root of |
| 33 | +the library. This file is downloaded and **autogenerated** from |
| 34 | +original [cucumber/gherkin translations](https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin-languages.json). |
| 35 | +So, in order to fix/update/add some translation, you should send a Pull Request to the `cucumber/gherkin` repository. |
| 36 | +`Behat\Gherkin` will re-download/regenerate translations from there before each release. |
| 37 | + |
| 38 | +It might sound difficult, but this way of dictionary-sharing gives us the ability to migrate `*.feature` files from |
| 39 | +language to language and library to library without the need to rewrite/modify them - with the same (Gherkin) dictionary |
| 40 | +used everywhere. |
0 commit comments