Closed sobolevn closed 3 years ago
Thanks for all the information! I'll try to suggest a fix in the next few days (hopefully today) :)
That's because of the following line:
root = true
It will be nice to log some message on WARNING
or ERROR
level instead of raising an exception, but imho the best solution is to load config only from 1 file (e.g. first matched file from DEFAULT_CONFIG_FILES
).
It will be also great to have some CLI flag --config
to set path to the config file - custom one (not included in DEFAULT_CONFIG_FILES
) or just to avoid loading all files defined in the before-mentioned constant.
@skarzi just to be clear: this is a valid .editorconfig
format. https://editorconfig.org/
.editorconfig
also doesn't seem to be a good place to store the configuration of Django's migration linter, what do you think about removing it from the defaults tuple?
Good point, it doesn't make that much sense to put the config in the editorconfig file :+1:
@David-Wobrock and what do you think about adding an option like --config config-path
to CLI?
For now, let's remove the .editorconfig
from the file list.
Adding this option is definitely an option for the next version :)
The Python configparser always expects section headers in the config files, which is not appropriate for editorconfig
@David-Wobrock and what do you think about adding an option like
--config config-path
to CLI?
I'll let you open an issue for this :)
2.5.1 released, hope everything works as expected now :)
Thanks for the help!
Yes, it works now! Thanks @David-Wobrock https://github.com/wemake-services/wemake-django-template/pull/1462
Traceback:
CI link: https://github.com/wemake-services/wemake-django-template/pull/1455/checks?check_run_id=1803497890 Reproduction: https://github.com/wemake-services/wemake-django-template/pull/1455