Commit 96c593a
Merge #482
482: Add yaml linting check in CI r=bidoubiwa a=meili-bot
_This PR is auto-generated._
To avoid mistakes in the `yaml` files, for example, duplicated keys or wrong indentation, we decided to add a lint check on `yaml` files.
Additional to the `.yamllint` files added in this pr, the following must be added as well:
- Linting check in CI:
Example in `tests.yml create a new job:
```yaml
lint:
name: Linting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Yaml lint check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
```
- Inside `.yamllint`, you might want to ignore some folders. For example `node_modules` in JS repos
Example in `.yamllint`:
```yaml
ignore: |
node_modules
````
Since `yamllint` is a python package, we cannot add a local check unless you download [`.yamllint`](https://github.com/adrienverge/yamllint).
In which case, you can check if the yaml files are correctly linted by running the following command: `yamllint .`
Additionally, you can use the VSCode extension [`YAML` by redhat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) which automatically highlights errors.
To help users be aware of this, we recommend adding this to your contributing guide:
```
To check if your `yaml` files are correctly formatted, you need to [install yamllint](https://yamllint.readthedocs.io/en/stable/quickstart.html#installing-yamllint) and then run `yamllint .`
````
## TODO
- [ ] Add the directories or files to ignore in `.yamllint`
- [ ] Add information in the contributing guide on this new check.
Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>File tree
5 files changed
+43
-21
lines changed- .github
- workflows
5 files changed
+43
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | | - | |
| 1340 | + | |
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
| |||
1634 | 1634 | | |
1635 | 1635 | | |
1636 | 1636 | | |
1637 | | - | |
| 1637 | + | |
1638 | 1638 | | |
1639 | 1639 | | |
1640 | 1640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
0 commit comments