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

🐛 panic against empty file with eof_newline feature, resolves: #196 #197

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

Shion1305
Copy link
Contributor

This PR resolves #196.

YAMLfmt throws panic when linting an empty file with eof_newline feature on.
The problem is that eofNewlineFeature has out-of-range access when content is empty.
This PR fixes it and handles case when content is empty.

@braydonk braydonk merged commit 2cdff15 into google:main Jul 17, 2024
7 checks passed
@Shion1305 Shion1305 deleted the shion/fix-196 branch July 17, 2024 17:39
@zevisert
Copy link

Hey @braydonk would you mind releasing this as v0.13.1? I'm using this from pre-commit (which pinned to a tag), and am running into this

@braydonk
Copy link
Collaborator

Hi @zevisert, I will be cutting a release tomorrow. Sorry for the long turnaround time on this release.

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.

out-of-range access on formatting empty file when eof_newline is enabled
3 participants