-
Notifications
You must be signed in to change notification settings - Fork 58
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
pretty-format-toml removes trailing comments in list #202
Comments
This looks like a duplicate of #161 |
I feel like this TOML pre-commit hook needs a big red warning that it's unsafe since it will unceremoniously delete comments. |
I find it'll do so even outside lists. And I have no workaround, making this hook pretty unusable. |
Related to macisamuele#202
@corneliusroemer I don't see a corresponding PR for the commit linked above. Is one on the way, or did I miss it? Thanks for following through with that! |
By the way, if people need a safe TOML pre-commit hook, this just became available a few days ago and it seems to work very well. (The previous version used a cumbersome Docker contaier.): |
When reformatting a list setting like
, the first comment is retained, but the second one is removed. Both comments should be retained. Not sure whether this is an issue with TomlSort or this repo.
The text was updated successfully, but these errors were encountered: