Skip to content

golangci-lint run does not report issues. #1051

Closed
@navneet1075

Description

@navneet1075
  • Yes, I've included all information below (version, config, etc).

I am not getting any issue reported .
for example, for the following struct , the comment is missing

type K8sClient interface {
GetKubernetesClient() *kubernetes.Clientset
GetDefaultNamespace() string
}

ideally i should get : exported type K8sClient should have comment or be unexported. but i am not getting any error . I also tried with multiple versions like 1.18.0, 1.24.0,1.25.0 but i get same results all the time .

Please include the following information:

Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.23.8 built from 76a82c6 on 2020-03-04T14:27:24Z
Config file
$ cat .golangci.yml
run:
  timeout: 10m
  tests: true
  skip-dirs-use-default: true

linters:
  disable-all: true
  enable:
    - deadcode
    - depguard
    - dupl
    - errcheck
    - goconst
    - gocritic
    - gocyclo
    - gofmt
    - goimports
    - golint
    - gosec
    - gosimple
    - govet
    - ineffassign
    - interfacer
    - maligned
    - misspell
    - nakedret
    - prealloc
    - scopelint
    - staticcheck
    - structcheck
    - stylecheck
    - typecheck
    - unconvert
    - unparam
    - unused
    - varcheck
Go environment
$ go version && go env
go version go1.14 darwin/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/i318056/Library/Caches/go-build"
GOENV="/Users/i318056/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/i318056/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/i318056/go/src/github.wdf.sap.corp/dsp/ml-deployment-api-tenant-handler/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tq/pj7bbsk55495fn0fkv17zxb80000gn/T/go-build898427876=/tmp/go-build -gno-record-gcc-switches -fno-common"
Verbose output of running
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /Users/i318056/go/src/github.wdf.sap.corp/dsp/ml-deployment-api-tenant-handler /Users/i318056/go/src/github.wdf.sap.corp/dsp /Users/i318056/go/src/github.wdf.sap.corp /Users/i318056/go/src /Users/i318056/go /Users/i318056 /Users /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 28 linters: [deadcode depguard dupl errcheck goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer maligned misspell nakedret prealloc scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck] 
INFO [lintersdb] Active 28 linters: [deadcode depguard dupl errcheck goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer maligned misspell nakedret prealloc scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck] 
INFO [loader] Go packages loading at mode 575 (types_sizes|imports|deps|exports_file|files|name|compiled_files) took 657.51361ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 2.890051ms 
INFO [runner/goanalysis_metalinter/goanalysis] analyzers took 0s with no stages 
INFO [runner/unused/goanalysis] analyzers took 0s with no stages 
INFO [runner] processing took 4.066µs with stages: max_same_issues: 1.986µs, cgo: 249ns, skip_dirs: 241ns, nolint: 193ns, max_from_linter: 190ns, path_prettifier: 187ns, filename_unadjuster: 186ns, skip_files: 126ns, diff: 121ns, autogenerated_exclude: 120ns, identifier_marker: 118ns, path_shortener: 63ns, max_per_file_from_linter: 60ns, exclude: 59ns, uniq_by_line: 57ns, exclude-rules: 55ns, source_code: 55ns 
INFO [runner] linters took 164.883503ms with stages: goanalysis_metalinter: 164.205201ms, unused: 638.253µs 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 10 samples, avg is 71.3MB, max is 71.8MB 
INFO Execution took 888.103131ms  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions