Skip to content

Commit

Permalink
Update CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
mo8it committed Jul 2, 2024
1 parent 43eb014 commit 4c5573b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ If you need any help with it or face any Git related problems, don't hesitate to
It may take time to review your pull request.
Please be patient 😇

When updating an exercise, check if its solution needs to be updated.

## Adding An Exercise

- Name the file `exercises/yourTopic/yourTopicN.rs`.
- Make sure to put in some helpful links, and link to sections of the book in `exercises/yourTopic/README.md`.
- Add a (possible) solution at `solutions/yourTopic/yourTopicN.rs` with comments and links explaining it.
- Make sure to put in some helpful links, and link to sections of The Book in `exercises/yourTopic/README.md`.
- In the exercise, add a `// TODO: …` comment where user changes are required.
- Add a solution at `solutions/yourTopic/yourTopicN.rs` with comments explaining it.
- Add the [metadata for your exercise](#exercise-metadata) in the `rustlings-macros/info.toml` file.
- Make sure your exercise runs with `rustlings run yourTopicN`.
- [Open a pull request](#pull-requests).
Expand All @@ -49,7 +52,9 @@ The exercise metadata should contain the following:
[[exercises]]
name = "yourTopicN"
dir = "yourTopic"
hint = """A useful (multi-line) hint for your exercise."""
hint = """
A useful (multi-line) hint for your exercise.
Include links to a section in The Book or a documentation page."""
```

If your exercise doesn't contain any test, add `test = false` to the exercise metadata.
Expand Down

0 comments on commit 4c5573b

Please sign in to comment.