Open danil51608 opened 1 year ago
Hi @danil51608.
This is because INI files with global values (such as root
in your case) isn't valid as per Python configparser
module.
I'll try to update the config-formatter
library on which language-formatters-pre-commit-hooks
depends to support this feature.
References:
@Delgan Hi!
I found out you had updated the config-formatter. Sadly it doesn't fix the issue. The error is still present.
Actually, I haven't updated config-formatter
yet, so it's not surprising that the issue isn't fixed.
My library depends on another one, namely ConfigUpdater
, and I was waiting for an answer in https://github.com/pyscaffold/configupdater/issues/123 to decide how I should implement the fix for .editorconfig
files.
oh, my bad. I thought you had updated it with this commit :)
Hey @danil51608.
I just published version 1.2.0
of config-formatter
which now supports INI files with no section headers.
If you force re-installation of language-formatters-pre-commit-hooks
by clearing the cache of pre-commit
, your .editorconfig
should now be formatted as expected without error. :+1:
@Delgan Hey! Thanks a lot! Works great! 😊
The hook works well if root is not present in my .editconfig file. However it breaks with the below message if I add root = true to my .editconfig:
My .editconfig