-
Notifications
You must be signed in to change notification settings - Fork 467
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
Config file undocumented? #3208
Comments
The config file is explained using examples, the INI example: [codespell]
skip = *.po,*.ts,./src/3rdParty,./src/Test
count =
quiet-level = 3 and the TOML example: [tool.codespell]
skip = '*.po,*.ts,./src/3rdParty,./src/Test'
count = ''
quiet-level = 3 |
"Explained" to not mean it is fully documented. |
I checked your code and realized that you "convert" the config file values back into command line arguments and then parse them via
Doing in config fiel
|
I agree the documentation could be improved, I can recall myself having a hard time initially trying to use or modify codespell. Merge requests to improve documentation would be welcome. By the way, I think you have understood that command line option |
Correct. Maybe add a section in the help-page explaining the general rules about how to map command line options into config file entries. Especially for the "store_true" values (count, check-hidden) there should be an extra comment to just leave them empty to say "True". |
Alternatively, boolean arguments could accept a value that gets parsed as enabling it in the INI file and documenting that. I think that would make it easier to grok. |
Good idea, however that's not what INI files usually look like. |
Actually configparser supports a wide range of values for booleans:
It looks like worth looking into. |
I might have missed it but it seems to me that the config file is nearly undocumented.
I can see all (?) possible config options via
codespell --help
. But these are for the command line. It is not clear if this options do have an equivalent in the config file and what values they should have.For example it seems that I can do
count = True
in the config file. But from reading--help
it was not clear thatTrue
is the correct value.Or
--check-hidden
is totally unclear. It works on command line but when I docheck-hidden = True
I gotcodespell: error: unrecognized arguments: True
. So I don't know how to configurecheck-hidden
via config file.The text was updated successfully, but these errors were encountered: