-
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requested
Description
Welcome
- Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've included all information below (version, config, etc).
Description of the problem
Relates #552
How important is it that the Go version used to run golangci-lint is the same as the Go version used by the project?
When attempting to upgrade to Go v1.23.0:
Killed
Error: golangci-lint exit with code 137
Version of golangci-lint
v1.59.1
Version of the GitHub Action
v6.1.0
Workflow file
name: golangci-lint Checks
on:
push:
branches:
- main
- 'release/**'
pull_request:
paths:
- .github/workflows/golangci-lint.yml
- .ci/.golangci*.yml
- .ci/tools/**
- internal/**
- go.sum
- main.go
- names/**
- tools/**
jobs:
golangci-lintb:
name: 2 of 3
runs-on: custom-linux-xl
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
cache: false
- id: golangci-lint-version
working-directory: .ci/tools
run: >-
echo "version=$(
go list -m all |
grep github.com/golangci/golangci-lint |
awk '{print $2}'
)" >> $GITHUB_OUTPUT
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: "${{ steps.golangci-lint-version.outputs.version }}"
args: --config .ci/.golangci2.yml
env:
GOGC: "200" # tried values between 5 and 3000 and same resultGolangci-lint configuration
issues:
max-per-linter: 10 # attempt at reducing memory
max-same-issues: 2 # attempt at reducing memory
concurrency: 4 # attempt at reducing memory
go: 1.23
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- containedctx
- contextcheck
- copyloopvar
- dogsled
- durationcheck
- errcheck
- errname
- errorlint
- goconst
- gocritic
- gofmt
- gosimple
- govet
- ineffassign
- makezero
- misspell
- mnd
linters-settings:
copyloopvar:
check-alias: true
dogsled:
max-blank-identifiers: 3
errcheck:
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# "ignore" is deprecated but "exclude-functions" doesn't seem to work or the syntax is non-obvious.
# https://github.com/kisielk/errcheck#excluding-functions
# Under exclude-functions are the various attempts at getting it to work, all of which result in d.Set being linted everywhere.
# exclude-functions:
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData.Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,io:Close
# - (github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.Set
errorlint:
errorf: false
goconst:
ignore-tests: true
min-occurrences: 6
gocritic:
enabled-tags:
- diagnostic
disabled-tags:
- experimental
- opinionated
- performance
- style
mnd:
checks:
- argument
ignored-functions:
- aws.Int32
- aws.Int64
- request.ConstantWaiterDelay
- request.WithWaiterMaxAttempts
- nullable.*
- tfresource.Retry*
- tfresource.With*
- retry.RetryContext
- schema.DefaultTimeout
- validation.*
- int64validator.*
- listvalidator.*
- setvalidator.*
- stringvalidator.*
- SetDefaultCreateTimeout
- SetDefaultReadTimeout
- SetDefaultUpdateTimeout
- SetDefaultDeleteTimeout
- make
- strconv.FormatFloat
- strconv.FormatInt
- strconv.ParseFloat
- strconv.ParseInt
- strings.SplitN
run:
timeout: 75mGo version
v1.23.0
Code example or link to a public repository
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requested