Skip to content

verify: Add information about the version/schema to error message on failure #1180

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

Closed
ccoVeille opened this issue Feb 17, 2025 · 1 comment
Closed

Comments

@ccoVeille
Copy link

ccoVeille commented Feb 17, 2025

Following golangci-lint-action to call verify.

I would like to see an improvement in the verify command, in a way more information are provided in the error message.

The error message reported is interesting, but it could be also more valuable if it could contain the version or the distant URL schema of the schema

Error: Failed to run: Error: Command failed: /home/runner/go/bin/golangci-lint config verify
38
jsonschema: "linters-settings.custom.connecterr" does not validate with "/properties/linters-settings/properties/custom/patternProperties/%5E.%2A$/oneOf": oneOf failed, subschemas 0, 1 matched
39
jsonschema: "linters-settings.custom.clouderr" does not validate with "/properties/linters-settings/properties/custom/patternProperties/%5E.%2A$/oneOf": oneOf failed, subschemas 0, 1 matched
40
jsonschema: "linters-settings.custom.translatedstring" does not validate with "/properties/linters-settings/properties/custom/patternProperties/%5E.%2A$/oneOf": oneOf failed, subschemas 0, 1 matched
41
Failed executing command with error: the configuration contains invalid elements
42
, Error: Command failed: /home/runner/go/bin/golangci-lint config verify
43

I think people are copy pasting things in issues. It would be OK if they fill all fields in issue template. But consider a local user who gets the issue.

I opened the feature improvement here because unless I'm wrong it's about improving verifycommand, and not the golangci-lint-action

On the way to do it, it's up to you. Adding it to error message, bump the equivalent of version command, add a message like "validating schema against https://.../jsonschema/golangci.v1.64.5.json"

@ccoVeille ccoVeille changed the title verify: Add the versuon to error message on failure verify: Add information about the version/schema to error message on failure Feb 17, 2025
@ldez ldez transferred this issue from golangci/golangci-lint Feb 17, 2025
@ldez ldez added the declined label Feb 17, 2025
@ldez
Copy link
Member

ldez commented Feb 17, 2025

The version of JSON schema is always the version of golangci-lint.
If this is not a version then a hash is used.

Users don't really need this information.

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

No branches or pull requests

2 participants