Skip to content

Errors with additionalProperties in jsonSchema file during config verify command #1176

@roark-menezes

Description

@roark-menezes

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

Description of the problem

Image
» Run golangci/golangci-lint-action@v6
» prepare environment
v run golangci-lint
    Running [/home/runner/golangci-lint-1.62.2-linux-amd64/golangci-lint config path] in [/home/runner/_work/xplore-evaluation-engine/xplore-evaluation-engine/functions/controlsapil] ...

Running [/home/runner/golangci-lint-1.62.2-linux-amd64/golangci-lint config verify] in [/home/runner/_work/xplore-evaluation-engine/xplore-evaluation-engine/functions/controlsapil] ...
Error: Failed to run: Error: Command failed: /home/runner/golangci-lint-1.62.2-1inux-amd64/golangci-lint
config verify
jsonschema: "run" does not validate with "/properties/run/additionalProperties": additionalProperties 'skip-dirs-use-default' not allowed
jsonschema: "linters-settings.gomoddirectives" does not validate with "/properties/linters-settings/properties/gomoddirectives/additionalProperties": additionalProperties 'replace-allow-local' not allowed
jsonschema: "linters-settings.gci" does not validate with "/properties/linters-settings/properties/gci/additionalProperties": additionalProperties 'section-seperators' not allowed
Failed executing command with error: the configuration contains invalid elements
, Error: Command failed: /home/runner/golangci-lint-1.62.2-linux-amd64/golangci-lint config verify
jsonschema: "run" does not validate with "/properties/run/additionalProperties": additionalProperties 'skip-dirs-use-default' not allowed
jsonschema: "linters-settings.gomoddirectives" does not validate with "/properties/linters-settings/properties/gomoddirectives/additionalProperties": additionalProperties 'replace-allow-local' not allowed
jsonschema: "linters-settings.gci" does not validate with "/properties/linters-settings/properties/gci/additionalProperties": additionalProperties 'section-seperators' not allowed
Failed executing command with error: the configuration contains invalid elements

    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
Error: Command failed: /home/runner/golangci-lint-1.62.2-linux-amd64/golangci-lint config verify

Issues during the config verify command, multiple errors within additionalProperties saying the following is not allowed:

  • skip-dirs-use-default
  • section-seperators
  • replace-allow-local

Havent seen any error for this so posting here, sorry if this is a non-issue and a problem on my end.

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.53.3 built with go1.20.5 from 2dcd82f on 2023-06-14T21:13:17Z

Configuration

# paste configuration file or CLI flags here

Go environment

$ go version && go env
go version go1.22.7 darwin/arm64
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/menezesr/Library/Caches/go-build'
GOENV='/Users/menezesr/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/menezesr/go/pkg/mod'
GONOPROXY='github.com/anzx/'
GONOSUMDB='github.com/anzx/'
GOOS='darwin'
GOPATH='/Users/menezesr/go'
GOPRIVATE='github.com/anzx/'
GOPROXY='https://platform-gomodproxy.services.x.gcp.anz/,https://artifactory.gcp.anz/artifactory/api/go/go,direct'
GOROOT='/Users/menezesr/go/go1.22.7'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/menezesr/go/go1.22.7/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.7'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/menezesr/Documents/Xplore/xplore-evaluation-engine/functions/controlsapi/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/mw/p5z73cnx7bg4chrgsmw0z5br0000gp/T/go-build607945158=/tmp/go-build -gno-record-gcc-switches -fno-common'

Verbose output of running

INFO [config_reader] Config search paths: [./ /Users/menezesr/Documents/Xplore/xplore-evaluation-engine/functions/controlsapi /Users/menezesr/Documents/Xplore/xplore-evaluation-engine/functions /Users/menezesr/Documents/Xplore/xplore-evaluation-engine /Users/menezesr/Documents/Xplore /Users/menezesr/Documents /Users/menezesr /Users /] 
INFO [config_reader] Used config file ../../.golangci.yaml 
ERRO Running error: unknown linters: 'err113,mnd,inamedparam', run 'golangci-lint help linters' to see the list of supported linters 
INFO Memory: 2 samples, avg is 27.1MB, max is 27.2MB 
INFO Execution took 8.456375ms 

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.).

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions