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

feat: add linting and/or formatting check adherence to styleguide conventions #265

Open
klauern opened this issue Nov 13, 2019 · 3 comments

Comments

@klauern
Copy link
Contributor

klauern commented Nov 13, 2019

It would be nice to see a lint or -lint option that you can pass to task so you can check your file against your proposed Styleguide. Would be useful for CI/CD checks as well.

@andreynering andreynering added the type: feature A new feature or functionality. label Nov 16, 2019
@andreynering
Copy link
Member

Hi @klauern,

That's indeed an interesting idea.

The YAML formatting rules can be a bit tricky to test, though. I don't if go-yaml/yaml would allow us to check if there are empty lines between tasks, if 2 spaces indentation is used, etc.

So, this needs a bit of investigation on how we'd implement it. 🙂

@andreynering andreynering changed the title Add linting option to check adherence to Styleguide conventions feat: add linting and/or formatting check adherence to styleguide conventions Nov 8, 2023
@andreynering
Copy link
Member

I just found out that there's a package for YAML formatting from Google: https://github.com/google/yamlfmt

It seems that it'd be possible to import as a library and have a builtin format flag from Task.

We need to see if it supports everything we need. For example: this open issue would ideally have to be implemented: google/yamlfmt#152.

@iwittkau
Copy link
Contributor

iwittkau commented Feb 4, 2024

I'm also very interested in this. Looks like there's some movement in that yamlfmt issue 🎉

@pd93 pd93 removed the type: feature A new feature or functionality. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants