You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-13
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,15 @@ _implement a new feature! ➡️ [open an Issue to discuss it first, then a Pull
21
21
22
22
`rustlings` is basically a glorified `rustc` wrapper. Therefore the source code
23
23
isn't really that complicated since the bulk of the work is done by `rustc`.
24
-
`src/main.rs` contains a simple `clap` CLI that loads from `src/verify.rs` and `src/run.rs`.
24
+
`src/main.rs` contains a simple `argh` CLI that connects to most of the other source files.
25
25
26
26
<aname="addex"></a>
27
27
### Adding an exercise
28
28
29
29
The first step is to add the exercise! Name the file `exercises/yourTopic/yourTopicN.rs`, make sure to
30
30
put in some helpful links, and link to sections of the book in `exercises/yourTopic/README.md`.
31
31
32
-
Next make sure it runs with `rustlings`. The exercise metadata is stored in `info.toml`, under the `exercises` array. The order of the `exercises` array determines the order the exercises are run by `rustlings verify`.
32
+
Next make sure it runs with `rustlings`. The exercise metadata is stored in `info.toml`, under the `exercises` array. The order of the `exercises` array determines the order the exercises are run by `rustlings verify` and `rustlings watch`.
33
33
34
34
Add the metadata for your exercise in the correct order in the `exercises` array. If you are unsure of the correct ordering, add it at the bottom and ask in your pull request. The exercise metadata should contain the following:
35
35
```diff
@@ -43,7 +43,7 @@ Add the metadata for your exercise in the correct order in the `exercises` array
43
43
...
44
44
```
45
45
46
-
The `mode` attribute decides whether Rustlings will only compile your exercise, or compile and test it. If you have tests to verify in your exercise, choose `test`, otherwise `compile`.
46
+
The `mode` attribute decides whether Rustlings will only compile your exercise, or compile and test it. If you have tests to verify in your exercise, choose `test`, otherwise `compile`. If you're working on a Clippy exercise, use `mode = "clippy"`.
47
47
48
48
That's all! Feel free to put up a pull request.
49
49
@@ -67,19 +67,19 @@ changes. There's a couple of things to watch out for:
67
67
#### Write correct commit messages
68
68
69
69
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
70
-
specification, because it makes it easier to generate changelogs automatically.
70
+
specification.
71
71
This means that you have to format your commit messages in a specific way. Say
72
72
you're working on adding a new exercise called `foobar1.rs`. You could write
73
73
the following commit message:
74
74
75
75
```
76
-
feat: Add foobar1.rs exercise
76
+
feat: add foobar1.rs exercise
77
77
```
78
78
79
79
If you're just fixing a bug, please use the `fix` type:
80
80
81
81
```
82
-
fix(verify): Make sure verify doesn't self-destruct
82
+
fix(verify): make sure verify doesn't self-destruct
83
83
```
84
84
85
85
The scope within the brackets is optional, but should be any of these:
@@ -96,36 +96,35 @@ When the commit also happens to close an existing issue, link it in the message
96
96
body:
97
97
98
98
```
99
-
fix: Update foobar
99
+
fix: update foobar
100
100
101
101
closes #101029908
102
102
```
103
103
104
104
If you're doing simple changes, like updating a book link, use `chore`:
105
105
106
106
```
107
-
chore: Update exercise1.rs book link
107
+
chore: update exercise1.rs book link
108
108
```
109
109
110
110
If you're updating documentation, use `docs`:
111
111
112
112
```
113
-
docs: Add more information to Readme
113
+
docs: add more information to Readme
114
114
```
115
115
116
116
If, and only if, you're absolutely sure you want to make a breaking change
117
117
(please discuss this beforehand!), add an exclamation mark to the type and
118
118
explain the breaking change in the message body:
119
119
120
120
```
121
-
fix!: Completely change verification
121
+
fix!: completely change verification
122
122
123
123
BREAKING CHANGE: This has to be done because lorem ipsum dolor
124
124
```
125
125
126
126
#### Pull Request Workflow
127
127
128
128
Once you open a Pull Request, it may be reviewed or labeled (or both) until
129
-
the maintainers accept your change. Then, [bors](https://github.com/bors) will
130
-
run the test suite with your changes and if it's successful, automatically
131
-
merge it in!
129
+
the maintainers accept your change. Please be patient, it may take some time
0 commit comments