aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
blob: 0fbfd79907b5ee5fb12310a94a15914339992908 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Contributing

## New features

Create an issue describing the feature. For more interactive discussions join the regular weekly meeting - see README.

## Bugs

Report bugs by creating an issue in this repository.

## Pull Requests (PRs)

Please make pull requests against the master branch.

Always use **rebase** instead of merge when bringing in changes from master to your feature branch.

For non-trivial PRs add an entry in relevant `CHANGELOG` at the **top** of appropriate category: *Added*, *Changed*, *Fixed*.

## Writing documentation

Documentation improvements are always welcome.
The source for the book is in `book/` and API documentation is generated from the source code.

## CI test preparation

Continuous Integration (CI) tests are run against all pull requests.

Please make sure that tests passes locally before submitting.

### Most tests locally

Might complain about missing QEMU if not available.

```shell
> cargo xtask ci
```

### Cargo format

```shell
> cargo fmt
```

### Example check

```shell
> cargo xtask example-check
```

### Run examples/tests on QEMU device

```shell
> cargo xtask qemu
```

Will execute examples on your local `qemu` install.

#### Adding examples/tests to xtask

If you have added further tests, you need to add the expected output in the `ci/expected` folder.

```shell
>  cargo xtask qemu --overwrite-expected
```

### Internal tests

Run internal fail tests locally with:

```shell
> cargo xtask test
```

#### Adding tests to internal tests

If you have added fail tests or changed the expected behavior, the expected output needs to be updated (corresponding `.stderr` files).
Inspect the error output, when sure that `ACTUAL OUTPUT` is correct you can re-run the test as:

```shell
> TRYBUILD=overwrite cargo xtask test
```

This will update the expected output to match the `ACTUAL OUTPUT`.
Please check that the updated files are indeed correct to avoid regressions.