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

cue/vet: Display obvious errors without -c flag #1928

Open
asdine opened this issue Sep 14, 2022 · 1 comment
Open

cue/vet: Display obvious errors without -c flag #1928

asdine opened this issue Sep 14, 2022 · 1 comment
Labels
FeatureRequest New feature or request Triage Requires triage/attention vet candidate for a vet rule to detect suspect usage

Comments

@asdine
Copy link

asdine commented Sep 14, 2022

Is your feature request related to a problem? Please describe.
I'm trying to use cue vet as a linter in a VS Code extension I'm building. Without the -c flag, running cue vet doesn't return anything other than some instances are incomplete; use the -c flag to show errors or suppress this message, even when there are other errors in the file or package (such as unknown identifiers, not syntax issues).
Enabling the "-c" flag returns lots of "incomplete value" errors for all the imported packages which "hide" the actual user errors.

Describe the solution you'd like
I believe the current behavior is useful when we're about to export our configuration but not really useful during development.
Ideally, cue vet without a flag should return all "obvious" errors found in the current package ("obvious" then needs to be defined) and not consider non-concrete issues.

Describe alternatives you've considered
I considered using -c and ignore all "incomplete value" messages but I'd rather rely on the cue vet's default behavior.

Additional context
This behavior is observable when having one or more third party packages in the cue.mod directory and importing them in one or more cue files at the root.

@asdine asdine added FeatureRequest New feature or request Triage Requires triage/attention labels Sep 14, 2022
@myitcv myitcv added the zGarden label Jun 13, 2023
@mvdan mvdan removed the zGarden label Feb 8, 2024
@jpluscplusm
Copy link
Collaborator

This is related to #2120. The problem might be helped by using the -c flag's negative form (-c=false), depending on the user's need.

This negative form isn't well documented just yet ... but we're addressing that at the moment.

@myitcv myitcv added the vet candidate for a vet rule to detect suspect usage label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest New feature or request Triage Requires triage/attention vet candidate for a vet rule to detect suspect usage
Projects
None yet
Development

No branches or pull requests

4 participants