verify: Add information about the version/schema to error message on failure
ccoVeille opened this issue · 1 comments
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"
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.