Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 41 additions & 38 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1018,48 +1018,51 @@ linters-settings:
- unusedwrite

# Enable all analyzers.
# enable-all and disable-all cannot both be true, therefore this section is
# commented out.
#
# Default: false
enable-all: true
# enable-all: true
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
# Default: []
disable:
- asmdecl
- assign
- atomic
- atomicalign
- bools
- buildtag
- cgocall
- composites
- copylocks
- deepequalerrors
- errorsas
- fieldalignment
- findcall
- framepointer
- httpresponse
- ifaceassert
- loopclosure
- lostcancel
- nilfunc
- nilness
- printf
- reflectvaluecompare
- shadow
- shift
- sigchanyzer
- sortslice
- stdmethods
- stringintconv
- structtag
- testinggoroutine
- tests
- unmarshal
- unreachable
- unsafeptr
- unusedresult
- unusedwrite
# disable:
# - asmdecl
# - assign
# - atomic
# - atomicalign
# - bools
# - buildtag
# - cgocall
# - composites
# - copylocks
# - deepequalerrors
# - errorsas
# - fieldalignment
# - findcall
# - framepointer
# - httpresponse
# - ifaceassert
# - loopclosure
# - lostcancel
# - nilfunc
# - nilness
# - printf
# - reflectvaluecompare
# - shadow
# - shift
# - sigchanyzer
# - sortslice
# - stdmethods
# - stringintconv
# - structtag
# - testinggoroutine
# - tests
# - unmarshal
# - unreachable
# - unsafeptr
# - unusedresult
# - unusedwrite

grouper:
# Require the use of a single global 'const' declaration only.
Expand Down
19 changes: 19 additions & 0 deletions pkg/config/reader_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package config

import (
"testing"

"github.com/golangci/golangci-lint/pkg/logutils"
)

func TestReader(t *testing.T) {
var toCfg, commandLineCfg Config
logger := logutils.NewStderrLog("")
logger.SetLevel(logutils.LogLevelDebug)

commandLineCfg.Run.Config = "../../.golangci.reference.yml"
reader := NewFileReader(&toCfg, &commandLineCfg, logger)
if err := reader.Read(); err != nil {
t.Fatalf("unexpected error reading .golangci.reference.yml: %v", err)
}
}