|
1 | 1 | # Contributing
|
2 | 2 |
|
3 |
| -If you discover issues, have ideas for improvements or new features, |
4 |
| -please report them to the [issue tracker][1] of the repository or |
5 |
| -submit a pull request. Please, try to follow these guidelines when you |
6 |
| -do so. |
| 3 | +If you encounter problems or have ideas for improvements or new features, please report them to the [issue tracker](https://github.com/rubocop-rspec/rubocop-rspec/issues) or submit a pull request. Please, try to follow these guidelines when you do so. |
7 | 4 |
|
8 | 5 | ## Issue reporting
|
9 | 6 |
|
10 | 7 | * Check that the issue has not already been reported.
|
11 |
| -* Check that the issue has not already been fixed in the latest code |
12 |
| - (a.k.a. `master`). |
| 8 | +* Check that the issue has not already been fixed in the latest code (a.k.a. `master`). |
13 | 9 | * Check if the issue is a non-goal of RuboCop RSpec.
|
14 |
| -* Be clear, concise and precise in your description of the problem. |
15 |
| -* Open an issue with a descriptive title and a summary in grammatically correct, |
16 |
| - complete sentences. |
17 |
| -* Report the versions of `rubocop-rspec`, as well as the output of `rubocop -V` |
| 10 | +* Be clear, concise, and precise in your description of the problem. |
| 11 | +* Open an issue with a descriptive title and a summary in grammatically correct, complete sentences. |
| 12 | +* Report the versions of `rubocop-rspec`, as well as the output of `rubocop -V`. |
18 | 13 | * Include any relevant code to the issue summary.
|
19 | 14 |
|
20 | 15 | ## Pull requests
|
21 |
| -1. Fork the project. |
22 |
| -2. Create a feature branch. |
23 |
| -3. Make sure to add tests. |
24 |
| -4. Make sure the test suite is passing (run `rake`). |
25 |
| -5. Add [Changelog](../blob/master/CHANGELOG.md) entry. |
26 |
| -6. Commit your changes. |
27 |
| -7. Push to the branch. |
28 |
| -8. Create new Pull Request. |
| 16 | + |
| 17 | +1. Fork the project. |
| 18 | +2. Create a feature branch. |
| 19 | +3. Make sure to add tests. |
| 20 | +4. Make sure the test suite passes (run `rake`). |
| 21 | +5. Add a [changelog](https://github.com/rubocop-rspec/rubocop-rspec/blob/master/CHANGELOG.md) entry. |
| 22 | +6. Commit your changes. |
| 23 | +7. Push to the branch. |
| 24 | +8. Create new Pull Request. |
29 | 25 |
|
30 | 26 | ## Creating new cops
|
31 |
| -There are some steps you have to follow when you add new cops: |
32 |
| -* Add an entry to `config/default.yml`. It's ordered list, make sure to follow the order. |
33 |
| -* The description of the cop in the code should match the one in config. `bin/build_config` copies the description from the cop to config. |
34 |
| -* The cop should include examples of good and bad code. |
35 |
| -* Generate documentation for the cop using `rake generate_cops_documentation`. |
36 |
| -* Add tests for as much use cases as you can think of. Always add tests for both code that should be reported and good code that should pass. |
37 |
| -* Some common pitfalls: |
38 |
| -** If you are writing cop inspecting code outside of an example, check for false positive when similarly named variables are used inside of the example. |
39 |
| -** If your cop is inspecting code inside an example, check that it works when the example is empty (empty `describe`, `it`, etc.). |
40 | 27 |
|
41 |
| -[1]: https://github.com/backus/rubocop-rspec/issues |
| 28 | +* Document examples of good and bad code in your cop. |
| 29 | +* Add an entry to `config/default.yml`. It's an ordered list, so be sure to insert at the appropriate place. |
| 30 | +* Run `bundle exec rake`. This will verify that the build passes as well as generate documentation and ensure that `config/default.yml` is up to date (don't forget to commit the documentation). |
| 31 | +* Add tests for as many use cases as you can think of. Always add tests for both bad code that should register an offense and good code that should not. |
| 32 | +* Common pitfalls: |
| 33 | + * If your cop inspects code outside of an example, check for false positives when similarly named variables are used inside of the example. |
| 34 | + * If your cop inspects code inside of an example, check that it works when the example is empty (empty `describe`, `it`, etc.). |
0 commit comments