Skip to content

Warning emitted on golangci-lint linters without any configuration #4586

@matthewhughes-uw

Description

@matthewhughes-uw

Welcome

Description of the problem

A warning is emitted when running golangci-lint linters without having configured the deprecated option

WARN [config_reader] The configuration option run.skip-dirs-use-default is deprecated, please use issues.exclude-dirs-use-default.

Expectation: I don't receive a warning about using a deprecated option unless I'm explicitly using it

Maybe this command should explicitly hide the deprecation warning like config appears to

Version of golangci-lint

Details
$ golangci-lint --version
golangci-lint has version 1.57.1 built with go1.22.1 from cd890db2 on 2024-03-20T16:34:34Z

Configuration

Details

N/A reproducible without a config file

Go environment

Details
$ go version && go env
go version go1.22.1 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/my-user/.cache/go-build'
GOENV='/home/my-user/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/my-user/.local/share/go/pkg/mod'
GOOS='linux'
GOPATH='/home/my-user/.local/share/go'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2547323891=/tmp/go-build -gno-record-gcc-switches'

Verbose output of running

Details

N/A not related to golangci-lint run

A minimal reproducible example or link to a public repository

Details

Set up a clean module (or just run golangci-lint linters in a directory without any config):

$ go mod init some-proj
$ cat <<EOF >main.go
package main

import (
	"fmt"
)

func main() {
	fmt.Println("hello, world")
}
EOF
$ golangci-lint linters >/dev/null
WARN [config_reader] The configuration option `run.skip-dirs-use-default` is deprecated, please use `issues.exclude-dirs-use-default`. 

Validation

  • Yes, I've included all information above (version, config, etc.).

Metadata

Metadata

Assignees

Labels

area: CLIRelated to CLIbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions