Skip to content

Conversation

@meili-bot
Copy link
Contributor

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:
    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:
    ignore: |
      node_modules

Since yamllint is a python package, we cannot add a local check unless you download .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 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.

@meili-bot meili-bot added the skip-changelog The PR will not appear in the release changelogs label Jun 14, 2023
@bidoubiwa bidoubiwa force-pushed the meili-bot/add-yamllint branch from 8a1c775 to 523f626 Compare June 14, 2023 14:16
@bidoubiwa bidoubiwa requested a review from alallema June 14, 2023 14:16
@bidoubiwa bidoubiwa force-pushed the meili-bot/add-yamllint branch from 523f626 to a60be26 Compare June 14, 2023 14:25
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@bidoubiwa
Copy link
Contributor

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Jul 18, 2023

@meili-bors meili-bors bot merged commit 96c593a into main Jul 18, 2023
@meili-bors meili-bors bot deleted the meili-bot/add-yamllint branch July 18, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog The PR will not appear in the release changelogs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants