--print-config does not work with --config
According to the CLI docs there is a --config
variable, and a --print-config
variable. I tried to add this to my system to have a quick way to check for the current configuration, but all it does is echoing the default help (which I think means my parameters are wrong). In my package.json
:
"scripts": {
"lint:html:config": "html-validate --print-config --config=tests/html-validator/config.json",
}
running npm run lint_html:config
returns:
❯ npm run lint:html:config
> @davidsneighbour/kollitsch-de@2022.2.67 lint:html:config
> html-validate --print-config --config tests/html-validator/config.json
html-validate-6.5.0
Usage: html-validate [OPTIONS] [FILENAME..] [DIR..]
Common options:
--ext=STRING specify file extensions (commaseparated).
-f, --formatter=FORMATTER specify the formatter to use.
--max-warnings=INT number of warnings to trigger nonzero exit code
--rule=RULE:SEVERITY set additional rule, use comma separator for
multiple.
--stdin process markup from stdin.
--stdin-filename=STRING specify filename to report when using stdin
Miscellaneous:
-c, --config=STRING use custom configuration file.
--init initialize project with a new configuration
--print-config output configuration for given file.
-h, --help show help.
--version show version.
Debugging options:
--dump-events output events during parsing.
--dump-source output post-transformed source data.
--dump-tokens output tokens from lexing stage.
--dump-tree output nodes from the dom tree.
Formatters:
Multiple formatters can be specified with a comma-separated list,
e.g. "json,checkstyle" to enable both.
To capture output to a file use "formatter=/path/to/file",
e.g. "checkstyle=dist/html-validate.xml"
[20:04:51][patrick@main]~/github.com/davidsneighbour/kollitsch.de(+3|%0|ok)
The config file exists, removing the --print-config parameter does run the validator. Is there anything conceptual that I am missing?