Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linting for yaml files #916

Merged
merged 3 commits into from
Aug 3, 2023
Merged

Conversation

ciarams87
Copy link
Member

Proposed changes

Problem: The yaml files in the repo were not linted.

Solution: Add yamllint step to pre-commit and as a CI step. All yaml files except the helm template files will be linted before every commit (with some rules excepted for the .github workflow files, any yaml files that include raw NGINX config, and line length in the deployment yaml). Linting rules are in the .yamllint.yaml file in the root of the repo. For details on the linting rules, see: https://yamllint.readthedocs.io/en/stable/rules.html#

Testing: Verified yaml files are linted on pre-commit.

Closes #539

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@ciarams87 ciarams87 requested a review from a team as a code owner August 1, 2023 14:44
@github-actions github-actions bot added the chore Pull requests for routine tasks label Aug 1, 2023
.yamllint.yaml Show resolved Hide resolved
.yamllint.yaml Show resolved Hide resolved
.yamllint.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@ciarams87 ciarams87 enabled auto-merge (squash) August 3, 2023 09:14
@ciarams87 ciarams87 merged commit 29fdf4a into nginxinc:main Aug 3, 2023
21 checks passed
@ciarams87 ciarams87 deleted the chore/add-yaml-lint branch August 18, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Chore: Add linting for YAML
4 participants