|
1 | 1 | # How to contribute to the Exercism Lean track |
2 | 2 |
|
3 | | -#### **Do you want to add an exercise?** |
| 3 | +## Contributing |
4 | 4 |
|
5 | | -- **Ensure that someone else isn't already adding it** by searching the [forum](https://forum.exercism.org/c/programming/lean) and the repository's [issues](https://github.com/exercism/lean/issues) and [pull requests](https://github.com/exercism/lean/pulls). |
| 5 | +We 💙 our community, but **this repository does not accept unsolicited pull requests at this time**. |
6 | 6 |
|
7 | | -- If nobody is yet adding the exercise, [open a conversation](https://forum.exercism.org/c/programming/lean) and indicate you'd like to add the exercise. |
| 7 | +Please read this [community blog post][guidelines] for details. |
8 | 8 |
|
9 | | -- Follow the [Add a Practice Exercise docs](https://exercism.org/docs/building/tracks/practice-exercises/add). |
| 9 | +### How to contribute |
10 | 10 |
|
11 | | -#### **Do you want to report a bug?** |
| 11 | +1. Open a topic on the [Lean forum][lean-forum] |
| 12 | +2. Discuss the proposal with the maintainers |
| 13 | +3. After receiving the go-ahead, submit a pull request |
12 | 14 |
|
13 | | -- **Ensure the bug was not already reported** by searching the [forum](https://forum.exercism.org/c/programming/lean). |
| 15 | +Pull requests must follow [Exercism's style guide][style]. |
14 | 16 |
|
15 | | -- If you're unable to find an open conversation addressing the problem, [open a new one](https://forum.exercism.org/new-topic?category=lean). Be sure to include a **title and clear description**, as much relevant information as possible, and (when possible) a **code sample**. |
| 17 | +Before submitting, please read: |
16 | 18 |
|
17 | | -#### **Do you want to fix a bug?** |
| 19 | +- [Contributors Pull Request Guide][contributors-pr-guide] |
| 20 | +- [Pull Request Guide][pr-guide] |
18 | 21 |
|
19 | | -- **Ensure that the bug is [reported](#do-you-want-to-report-a-bug)**. |
20 | | - Only start fixing the bug when there is agreement on whether (and how) it should be fixed. |
| 22 | +When opening a PR: |
21 | 23 |
|
22 | | -- Fix the bug and [submit a Pull Request](https://exercism.org/docs/building/github/contributors-pull-request-guide) to this repository. |
| 24 | +- Clearly describe the problem and the solution |
| 25 | +- Link to the corresponding forum discussion |
| 26 | +- Add a link to the PR in that same discussion |
23 | 27 |
|
24 | | -- Ensure the PR description clearly describes the problem and solution. |
25 | | - Include a link to the bug's corresponding forum conversation. |
| 28 | +If the PR touches an existing exercise, please also consider [this warning][unnecessary-test-runs]. |
26 | 29 |
|
27 | | -- Before submitting, please read the [Contributors Pull Request Guide](https://exercism.org/docs/building/github/contributors-pull-request-guide) and [Pull Request Guide](https://exercism.org/docs/community/being-a-good-community-member/pull-requests). |
| 30 | +### Adding an exercise |
28 | 31 |
|
29 | | -#### **Do you intend to add a new feature or change an existing one?** |
| 32 | +Practice exercises should follow the [Add a Practice Exercise docs][add-exercise]. |
30 | 33 |
|
31 | | -- **Ensure that the feature or change is discussed on the [forum](https://forum.exercism.org/c/programming/lean).** |
32 | | - Only start adding the feature or change when there is agreement on whether (and how) it should be added or changed. |
| 34 | +All exercises must include a test generator located in: |
33 | 35 |
|
34 | | -- Add the feature or change and [submit a Pull Request](https://exercism.org/docs/building/github/contributors-pull-request-guide) to this repository. |
| 36 | +```text |
| 37 | +generator/Generator/Generator |
| 38 | +``` |
35 | 39 |
|
36 | | -- Ensure the PR description clearly describes the problem and solution. |
37 | | - Include a link to the bug's corresponding forum conversation. |
| 40 | +The generator must: |
38 | 41 |
|
39 | | -- Before submitting, please read the [Contributors Pull Request Guide](https://exercism.org/docs/building/github/contributors-pull-request-guide) and [Pull Request Guide](https://exercism.org/docs/community/being-a-good-community-member/pull-requests). |
| 42 | +- be imported by `generator/Generator/Generator.lean` |
| 43 | +- define the required generator functions |
| 44 | +- register them in the `dispatch` table |
| 45 | + |
| 46 | +The Lean track provides a generator script to help with this process. |
| 47 | + |
| 48 | +See the [generator documentation][generator-doc]. |
| 49 | + |
| 50 | +[guidelines]: https://exercism.org/blog/contribution-guidelines-nov-2023 |
| 51 | +[lean-forum]: https://forum.exercism.org/c/programming/lean/761 |
| 52 | +[style]: https://exercism.org/docs/building/markdown/style-guide |
| 53 | +[contributors-pr-guide]: https://exercism.org/docs/building/github/contributors-pull-request-guide |
| 54 | +[pr-guide]: https://exercism.org/docs/community/being-a-good-community-member/pull-requests |
| 55 | +[unnecessary-test-runs]: https://exercism.org/docs/building/tracks#h-avoiding-triggering-unnecessary-test-runs |
| 56 | +[add-exercise]: https://exercism.org/docs/building/tracks/practice-exercises/add |
| 57 | +[generator-doc]: generators/GenerateTestFile.md |
0 commit comments