Skip to content
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

--no-schema is ignored when schema directive is present #657

Open
cdwilson opened this issue Aug 21, 2024 · 0 comments
Open

--no-schema is ignored when schema directive is present #657

cdwilson opened this issue Aug 21, 2024 · 0 comments

Comments

@cdwilson
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant