Skip to content

Add yamlfmt pre-commit hook#2538

Open
codingjoe wants to merge 2 commits intodjango:mainfrom
codingjoe:ymlfmt
Open

Add yamlfmt pre-commit hook#2538
codingjoe wants to merge 2 commits intodjango:mainfrom
codingjoe:ymlfmt

Conversation

@codingjoe
Copy link
Copy Markdown
Contributor

@codingjoe codingjoe commented Mar 4, 2026

I noticed that the YAML indentation is all over the place. There's a handy linter for that.

@codingjoe codingjoe marked this pull request as ready for review March 4, 2026 17:05
Copilot AI review requested due to automatic review settings March 4, 2026 17:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes YAML formatting across the repository by adding yamlfmt to the existing prek/pre-commit hook set and applying the formatter’s indentation/style to existing YAML files.

Changes:

  • Add google/yamlfmt as a new hook in .pre-commit-config.yaml and stop Prettier from targeting YAML files.
  • Reformat existing YAML files (docker compose, GitHub Actions workflows, Dependabot config) to consistent 2-space indentation.
  • Update .editorconfig to explicitly set YAML indentation to 2 spaces.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docker-compose.yml Re-indented to a consistent 2-space YAML style.
.pre-commit-config.yaml Adds yamlfmt hook and excludes YAML from Prettier to avoid formatter overlap.
.github/workflows/tests.yml Re-indented for consistency with the new YAML formatter.
.github/workflows/prek.yml Re-indented for consistency with the new YAML formatter.
.github/workflows/docker-test-build.yml Re-indented for consistency with the new YAML formatter.
.github/workflows/docker-publish.yml Re-indented for consistency with the new YAML formatter.
.github/dependabot.yml Re-indented for consistency with the new YAML formatter.
.editorconfig Sets YAML files to indent_size = 2 to match formatting expectations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@codingjoe
Copy link
Copy Markdown
Contributor Author

cc @ulgens since we previously taked about it

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

Successfully merging this pull request may close these issues.

2 participants