taplo
taplo copied to clipboard
`--no-schema` is ignored when schema directive is present
I'm trying to use taplo lint --no-schema
in pre-commit.ci where no network access is allowed at runtime.
Even though --no-schema
is specified, it tries to look up the schema based on the directive in the file. I'm getting an error:
ERROR taplo:lint_files: invalid file error=failed to load schema https://json.schemastore.org/pyproject.json
My pyproject.toml
has this directive:
#:schema https://json.schemastore.org/pyproject.json
If I remove this directive from pyproject.toml
, the error goes away.
I would expect that --no-schema
would take precedence over any #:schema
directive in the file.
Is there a way to force taplo lint
to run such that it does not make any network calls for external schema files?