Skip to content

golangci-lint v1.6.2 process killed on go v1.24 darwin #5596

Closed
@Ale-Cas

Description

@Ale-Cas

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

How did you install golangci-lint?

go install

Description of the problem

It looks like golangci-lint v1.6.2 is somehow not compatible with go 1.24.0 running on darwin/arm64 (mac M1).
The linter gets killed on every command I'm running.
It might be related to this old thread: https://www.reddit.com/r/golang/comments/11l2zes/golangcilint_out_of_memory/

Image

Version of golangci-lint

$ golangci-lint --version
[1]    72725 killed     golangci-lint --version

Image

Configuration

---
linters-settings:
  dupl:
    threshold: 100
  exhaustive:
    default-signifies-exhaustive: false
  funlen:
    lines: 100
    statements: 50
  gci:
    sections:
      - standard
      - default
      - localmodule
  goconst:
    min-len: 2
    min-occurrences: 2
  gocritic:
    enabled-tags:
      - diagnostic
      - experimental
      - opinionated
      - performance
      - style
    disabled-checks:
      - dupImport # https://github.com/go-critic/go-critic/issues/845
      - ifElseChain
      - octalLiteral
      - whyNoLint
      - wrapperFunc
  gocyclo:
    min-complexity: 10
  goimports:
    local-prefixes: github.com/golangci/golangci-lint
  mnd:
    checks:
      - argument
      - case
      - condition
      - return
  govet:
    enable:
      - shadow
    settings:
      printf:
        funcs:
          - (gofr.dev/pkg/gofr/Logger).Logf
          - (gofr.dev/pkg/gofr/Logger).Errorf
  lll:
    line-length: 140
  misspell:
    locale: US
  nolintlint:
    allow-unused: false # report any unused nolint directives
    require-explanation: true # require an explanation for nolint directives
    require-specific: true # require nolint directives to be specific about which linter is being skipped
  usestdlibvars:
    time-layout: true # Suggest the use of constants available in time package
  revive:
    rules:
    # default revive rules, they have to be present otherwise they are disabled
      - name: blank-imports
      - name: context-as-argument
      - name: context-keys-type
      - name: dot-imports
      - name: empty-block
      - name: error-naming
      - name: error-return
      - name: error-strings
      - name: errorf
      - name: exported
        arguments:
          # enables checking public methods of private types
          - "checkPrivateReceivers"
          # make error messages clearer
          - "sayRepetitiveInsteadOfStutters"
      - name: increment-decrement
      - name: indent-error-flow
      - name: range
      - name: receiver-naming
      - name: redefines-builtin-id
      - name: superfluous-else
      - name: time-naming
      - name: unexported-return
      - name: unreachable-code
      - name: unused-parameter
      - name: var-declaration
      - name: var-naming
    # additional revive rules
      - name: bare-return
      - name: bool-literal-in-expr
      - name: comment-spacings
      - name: early-return
      - name: defer
      - name: deep-exit
      - name: unused-receiver
      - name: use-any

linters:
  # please, do not use `enable-all`: it's deprecated and will be removed soon.
  # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
  disable-all: true
  enable:
    - asciicheck
    - bodyclose
    - canonicalheader
    - copyloopvar
    - dogsled
    - dupl
    - err113
    - errcheck
    - errorlint
    - exhaustive
    - funlen
    - gci
    - gochecknoglobals
    - gochecknoinits
    - gocognit
    - goconst
    - gocritic
    - gocyclo
    - godot
    - gofmt
    - goprintffuncname
    - gosec
    - gosimple
    - govet
    - ineffassign
    - lll
    - mirror
    - misspell
    - mnd
    - nakedret
    - nestif
    - noctx
    - nolintlint
    - prealloc
    - revive
    - rowserrcheck
    - staticcheck
    - stylecheck
    - testifylint
    - thelper
    - unconvert
    - unparam
    - unused
    - usestdlibvars
    - whitespace
    - wsl

  # don't enable:
  # - godox  # Disabling because we need TODO lines at this stage of project.
  # - testpackage # We also need to do unit test for unexported functions. And adding _internal in all files is cumbersome.

issues:
  include:
    - EXC0014

  # exclude-use-default: false
  # exclude-use-default: false # By default, golangci-lint does not enforce comments on exported types. We want it.
  # Excluding configuration per-path, per-linter, per-text and per-source
  exclude-rules:
    - path: _test\.go
      linters:
        - gomnd
        - dupl
        - goconst

Go environment

$ go version && go env
go version go1.24.0 darwin/arm64
AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/ale/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/ale/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/h0/_pkxhksx1rqgphbnwpbcdg5h0000gn/T/go-build3608870839=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/ale/Projects/personal/gofr/go.mod'
GOMODCACHE='/Users/ale/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/ale/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/ale/go/pkg/mod/golang.org/[email protected]'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/ale/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/ale/go/pkg/mod/golang.org/[email protected]/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.0'
GOWORK='/Users/ale/Projects/personal/gofr/go.work'
PKG_CONFIG='pkg-config'

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v

Image

A minimal reproducible example or link to a public repository

I was running the configured linters for a PR on https://github.com/gofr-dev/gofr

Validation

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

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions