Skip to content

Conversation

@sean-rose
Copy link
Contributor

Description

By default yamllint requires files to end with a newline (docs) but doesn't allow any blank lines at the end of YAML files (docs). This can sometimes be tricky for developers to get exactly right, especially depending on their particular text editor settings (e.g. Slack thread).

This PR relaxes the yamllint configuration to allow one blank line at the end of YAML files to avoid that gotcha.

Related Tickets & Documents

N/A

Reviewer, please follow this checklist

@sean-rose sean-rose requested a review from a team as a code owner December 2, 2025 00:46
Copy link
Collaborator

@akkomar akkomar left a comment

Choose a reason for hiding this comment

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

question (non-blocking, because I believe you spent more time looking into this than me): wouldn't it be better to add a pre-commit hook to fix end-of-file newlines instead? It would auto-fix the issue and keep EOF handling consistent across all file types (Black already enforces this for Python).

@sean-rose
Copy link
Contributor Author

wouldn't it be better to add a pre-commit hook to fix end-of-file newlines instead? It would auto-fix the issue and keep EOF handling consistent across all file types (Black already enforces this for Python).

As someone who uses the pre-commit setup that's fine by me, but my impression is not many people are actually using that (though I suppose situations like this could help instigate uptake).

Also, there currently isn't a pre-commit setup in private-bigquery-etl, though that'd probably be a good idea and should be relatively straightforward to do (except for the ones that use bqetl commands).

@scholtzan do you have an opinion on this?

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.

3 participants