Skip to content

Draft: 🐋 Add yaml-lint github action and add .editorconfig#512

Open
tzabbi wants to merge 7 commits intokubetail-org:mainfrom
tzabbi:main
Open

Draft: 🐋 Add yaml-lint github action and add .editorconfig#512
tzabbi wants to merge 7 commits intokubetail-org:mainfrom
tzabbi:main

Conversation

@tzabbi
Copy link
Copy Markdown
Contributor

@tzabbi tzabbi commented Jun 23, 2025

Fixes #510

Summary

Add yaml-lint github action job and .editorconfig

Changes

  • to have a standardized YAML code style, we implement YAML lint GitHub action
  • to have some unified code rules through all files, we add a .editorconfig

Submitter checklist

  • Add the correct emoji to the PR title
  • Link the issue number, if any, to Fixes #
  • Add summary and explain changes in the PR description
  • Rebase branch to HEAD
  • Squash changes into one signed, single commit 1

Footnotes

  1. See suggested commit format

Signed-off-by: Tom Zaspel <tom@zaspel.it>
@tzabbi tzabbi changed the title 🐋 Add yaml-lint github action and add .editorconfig Draft: 🐋 Add yaml-lint github action and add .editorconfig Jun 23, 2025
Copy link
Copy Markdown
Member

@amorey amorey left a comment

Choose a reason for hiding this comment

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

Let's ignore pnpm-lock.yaml and other generated yaml files because otherwise we'll be in constant contention with the code generators

with:
python-version: "3.x"

- name: Install yamllint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it make sense to use a one-step yamllint action? I don't have any personal experience with them but here are some options:
https://github.com/marketplace/actions/yaml-lint
https://github.com/marketplace/actions/yamllint-github-action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just used the example from the yaml lint documentation: https://yamllint.readthedocs.io/en/latest/integration.html#integration-with-github-actions

@github-project-automation github-project-automation bot moved this to In Progress in Kubetail Jun 23, 2025
@amorey amorey self-requested a review June 23, 2025 18:25
Copy link
Copy Markdown
Member

@amorey amorey left a comment

Choose a reason for hiding this comment

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

The current .editorconfig settings will contend with the gofmt tool that uses tabs instead of spaces. Considering that this is a multi-language monorepo does it make more sense to configure each language formatter separately?

Signed-off-by: Tom Zaspel <tom@zaspel.it>
@tzabbi
Copy link
Copy Markdown
Contributor Author

tzabbi commented Jun 25, 2025

I will fix everything after my vacation.

@tzabbi
Copy link
Copy Markdown
Contributor Author

tzabbi commented Jul 7, 2025

@amorey do you have some requirements for rust, go, ... files in regard of code syntax? I will add them to the .editorconfig. Same for the yaml linter, which files will be autogenerated?

@amorey
Copy link
Copy Markdown
Member

amorey commented Jul 8, 2025

@tzabbi Currently we're language-specific linters and vetters with their default setups (see ci.yml).

@tzabbi tzabbi force-pushed the main branch 4 times, most recently from 25b2011 to c521683 Compare July 25, 2025 08:49
Signed-off-by: Tom Zaspel <tom@zaspel.it>
Signed-off-by: Tom Zaspel <tom@zaspel.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Implement repo-wide yaml linter

2 participants