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

Show all parsing errors during vet, not just the first #1473

Open
mlieberman85 opened this issue Jan 15, 2022 · 1 comment
Open

Show all parsing errors during vet, not just the first #1473

mlieberman85 opened this issue Jan 15, 2022 · 1 comment
Labels
FeatureRequest New feature or request roadmap/errors Related to improving error messages.

Comments

@mlieberman85
Copy link

I am not sure if this is a bug or currently intended behavior, but I would like to be able to show all currently evaluated schema violations during vet, not just the first one. I know there are the -i and -E` flags but they don't appear to do what I want.

An example:
testschema.cue

#TestSchema: {
    foo: "bar"
    baz: int
}

test.json

{
    "foo": "blah",
    "baz": "5"
}
cue vet -i -E testschema.cue testschema.json -d '#TestSchema'

foo: conflicting values "bar" and "blah":
    ./testschema.cue:2:10
    ./testschema.json:2:12

whereas I would hope to get something like:

foo: conflicting values "bar" and "blah":
    ./testschema.cue:2:10
    ./testschema.json:2:12

baz: conflicting values "5" and int (mismatched types string and int):
    ./testschema.cue:3:10
    ./testschema.json:3:12

My main use case is for linting here, as I don't have to run vet after every single error I fix. I would just need to fix errors and if those fixes expose something further down the line that's alright.

@mlieberman85 mlieberman85 added FeatureRequest New feature or request Triage Requires triage/attention labels Jan 15, 2022
@verdverm
Copy link

Related: #1093

Relevant: #1319

@mpvl mpvl added the roadmap/errors Related to improving error messages. label Jan 17, 2022
@rogpeppe rogpeppe removed the Triage Requires triage/attention label Apr 19, 2022
@myitcv myitcv added the zGarden label Jun 15, 2023
@mvdan mvdan removed the zGarden label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request roadmap/errors Related to improving error messages.
Projects
None yet
Development

No branches or pull requests

6 participants