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

Request: traversing into enum for failure message #180

Open
jamesbraza opened this issue Jun 14, 2024 · 1 comment
Open

Request: traversing into enum for failure message #180

jamesbraza opened this issue Jun 14, 2024 · 1 comment

Comments

@jamesbraza
Copy link

In astral-sh/ruff#11880 today with validate-pyproject==0.18, I am getting an error that says:

[ERROR] `tool.ruff.lint` cannot be validated by any definition:

The actual error was in an extend-select field whose JSON schema type is enum:

    "RuleSelector": {
      "type": "string",
      "enum": [
        "A",
        "A0",
        ...,
      ]
    },

The request here is to traverse into the enum for a better error message:

[ERROR] `tool.ruff.lint.extend-select` cannot be validated by any definition:

To show where the exact error lies

@abravalheri
Copy link
Owner

Hi @jamesbraza, sorry this issue slipped under my radar.
Right now we depend on the implementation of the fastjsonschema dependency, so I believe we cannot implement this directly in validate-pyproject.

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

2 participants