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

Continues processing JSONs even if hook fails (fixes #1038) #1039

Merged
merged 1 commit into from Apr 20, 2024

Conversation

amarvin
Copy link
Contributor

@amarvin amarvin commented Apr 12, 2024

Fixes #1038

@amarvin
Copy link
Contributor Author

amarvin commented Apr 18, 2024

@asottile, any chance you could consider this change, please?

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

this needs a test which is why I didn't look at it

pre_commit_hooks/pretty_format_json.py Outdated Show resolved Hide resolved
@amarvin
Copy link
Contributor Author

amarvin commented Apr 19, 2024

this needs a test which is why I didn't look at it

Great point! I added a test that failed in main, but passes in this branch.

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

@asottile asottile enabled auto-merge April 20, 2024 17:16
@asottile asottile merged commit 528a309 into pre-commit:main Apr 20, 2024
6 checks passed
@amarvin amarvin deleted the patch-1 branch April 20, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

pretty-format-json stops formatting JSONs when it encounters one with incorrect format (e.g. JSON5 comments)
2 participants