-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
445: Add yaml linting check in CI r=brunoocasali 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 yaml-lint: name: Yaml 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> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
- Loading branch information
Showing
7 changed files
with
91 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
labels: | ||
- 'skip-changelog' | ||
- 'dependencies' | ||
rebase-strategy: disabled | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
labels: | ||
- 'skip-changelog' | ||
- 'dependencies' | ||
rebase-strategy: disabled | ||
|
||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- skip-changelog | ||
- dependencies | ||
rebase-strategy: disabled | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- skip-changelog | ||
- dependencies | ||
rebase-strategy: disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends: default | ||
ignore: | | ||
node_modules | ||
rules: | ||
comments-indentation: disable | ||
line-length: disable | ||
document-start: disable | ||
brackets: disable | ||
truthy: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters