dbt-labs / dbt-postgres

Apache License 2.0
34 stars 14 forks source link

Adding YAML formatter #141

Open leahwicz opened 3 months ago

leahwicz commented 3 months ago

resolves #137

Problem

Have a linter and formatter for GitHub workflows

Solution

This is one possible solution after looking at a few possibilities here is a summary of my findings

Linter Options

Formatter Options

This PR shows the top vote options enabled and their changes.

I have it only enabled for GitHub workflow files at the moment. I also had it format the .pre-commit-config.yaml file as well since it was all over the place. If we enable it for all YAML files then a bunch of the changie files will change which I'm not sure how that would impact changie at the moment.

Checklist

leahwicz commented 3 months ago

@mikealfare I listed what I found on each of the options for linters and formatters above and why I picked these 2. I didn't see too many other options that looked any different out there. Let me know if this is what you were hoping the for linter and formatter to achieve.

I know you mentioned kebab casing, capitalization, etc. standardizing as well but none of the formatters are enforcing things like that so we would have to look at some more extensive tooling if you want that kind of standard enforced.

mikealfare commented 3 months ago

@mikealfare I listed what I found on each of the options for linters and formatters above and why I picked these 2. I didn't see too many other options that looked any different out there. Let me know if this is what you were hoping the for linter and formatter to achieve.

I know you mentioned kebab casing, capitalization, etc. standardizing as well but none of the formatters are enforcing things like that so we would have to look at some more extensive tooling if you want that kind of standard enforced.

Thanks for the PR @leahwicz! I agree with your assessment above. I left two comments. Let me know your thoughts.