Skip to content

schema validation errors in issues.severity that should be valid #4616

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
5 tasks done
ryancurrah opened this issue Apr 5, 2024 · 1 comment · Fixed by #4617
Closed
5 tasks done

schema validation errors in issues.severity that should be valid #4616

ryancurrah opened this issue Apr 5, 2024 · 1 comment · Fixed by #4617
Assignees
Labels
area: JSON schema bug Something isn't working

Comments

@ryancurrah
Copy link
Member

ryancurrah commented Apr 5, 2024

Welcome

Description of the problem

Schema shows not valid for issues.severity. Though looking at the code it seems my config is valid. I think something is wrong with the schema.

Version of golangci-lint

golangci-lint --version
golangci-lint has version 1.57.2 built with go1.22.1 from 77a8601 on 2024-03-28T18:39:06Z

Configuration

run:
  modules-download-mode: readonly

severity:
  default-severity: error
  case-sensitive: false
  rules:
    - severity: info
      path: _test\.go # Lint issues in tests should never block a pull request
    - severity: info
      linters:
        - deadcode
        - funlen
        - gochecknoinits
        - gocognit
        - goconst
        - gofmt
        - goimports
        - lll
        - misspell
        - shadow
        - structcheck
        - unconvert
        - unparam
        - unused
        - varcheck
    - severity: info
      linters:
        - revive
      text: "package-comments:"
    - severity: info
      linters:
        - revive
      text: "exported:"
    - severity: info
      linters:
        - revive
      text: "var-naming:"
    - severity: info
      linters:
        - gocritic
      text: "rewrite if-else to switch statement"
    - severity: info
      linters:
        - staticcheck
      text: "SA1019" # Allow using a deprecated function, variable, constant or field

Go environment

$ go version && go env
# paste output here

Verbose output of running

golangci-lint config verify
jsonschema: "severity.rules.2" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/0/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.2" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/1/$ref/additionalProperties": additionalProperties 'text', 'linters' not allowed
jsonschema: "severity.rules.2" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/2/$ref/additionalProperties": additionalProperties 'text' not allowed
jsonschema: "severity.rules.2" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/3/$ref/additionalProperties": additionalProperties 'linters' not allowed
jsonschema: "severity.rules.3" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/0/$ref/additionalProperties": additionalProperties 'text', 'linters' not allowed
jsonschema: "severity.rules.3" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/1/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.3" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/2/$ref/additionalProperties": additionalProperties 'text' not allowed
jsonschema: "severity.rules.3" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/3/$ref/additionalProperties": additionalProperties 'linters' not allowed
jsonschema: "severity.rules.4" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/0/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.4" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/1/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.4" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/2/$ref/additionalProperties": additionalProperties 'text' not allowed
jsonschema: "severity.rules.4" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/3/$ref/additionalProperties": additionalProperties 'linters' not allowed
jsonschema: "severity.rules.5" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/0/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.5" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/1/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.5" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/2/$ref/additionalProperties": additionalProperties 'text' not allowed
jsonschema: "severity.rules.5" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/3/$ref/additionalProperties": additionalProperties 'linters' not allowed
jsonschema: "severity.rules.6" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/0/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.6" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/1/$ref/additionalProperties": additionalProperties 'linters', 'text' not allowed
jsonschema: "severity.rules.6" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/2/$ref/additionalProperties": additionalProperties 'text' not allowed
jsonschema: "severity.rules.6" does not validate with "/properties/severity/properties/rules/items/allOf/0/oneOf/3/$ref/additionalProperties": additionalProperties 'linters' not allowed
Error: the configuration contains invalid elements
Usage:
  golangci-lint config verify [flags]

Global Flags:
      --color string   Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
  -c, --config PATH    Read config from file path PATH
  -h, --help           Help for a command
      --no-config      Don't read config file
  -v, --verbose        Verbose output

Failed executing command with error: the configuration contains invalid elements

A minimal reproducible example or link to a public repository

// add your code here

Validation

  • Yes, I've included all information above (version, config, etc.).
@ryancurrah ryancurrah added the bug Something isn't working label Apr 5, 2024
@ryancurrah ryancurrah changed the title schema errors for severity schema errors for issues.severity Apr 5, 2024
@ryancurrah ryancurrah changed the title schema errors for issues.severity schema validation errors in issues.severity when they are valid Apr 5, 2024
@ryancurrah ryancurrah changed the title schema validation errors in issues.severity when they are valid schema validation errors in issues.severity that should be valid Apr 5, 2024
@ldez ldez self-assigned this Apr 5, 2024
@ldez ldez closed this as completed in #4617 Apr 5, 2024
@ryancurrah
Copy link
Member Author

Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: JSON schema bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants