Skip to content

Inconsistent linting results compare with gometalinter #477

Closed
@lnshi

Description

@lnshi

I just migrated to this project because was told by gometalinter's owner that that project will be deprecated soon.

But as this issue's title indicates: some of my previous code linting issues reported by gometalinter are just silently gone with golangci-lint, like the issues reported by: ineffassign, megacheck, unparam , staticcheck, gosec and dupl.

My golangci-lint config file .golangci.yml:

run:
  deadline: 10m
  skip-files:
    - daemon/httpserving/tf/benchmarks/json_codec_benchmark_test.go

linters:
  disable-all: true
  enable:
    - deadcode
    - dupl
    - gosec
    - goconst
    - gofmt
    - goimports
    - golint
    - stylecheck
    - gosimple
    - interfacer
    - ineffassign
    - misspell
    - nakedret
    - structcheck
    - staticcheck
    - unconvert
    - unparam
    - varcheck
    - vet
    - vetshadow
    - typecheck
    - maligned
    - prealloc
    - scopelint
    - gocritic
    - errcheck
    - unused
    - gocyclo
    - depguard

issues:
  exclude:
    # gosec
    - "G401: Use of weak cryptographic primitive"
    # gosec
    - "G501: Blacklisted import `crypto/md5`: weak cryptographic primitive"
    # staticcheck
    - "SA1019: grpc.CallCustomCodec is deprecated: use ForceCodec instead."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions