Skip to content

Commit

Permalink
update linter (#2307)
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli authored May 28, 2024
1 parent 99ba9e5 commit 065af27
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64
with:
version: v1.57.2
version: v1.59.0 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
- name: actionlint
run: make tools && actionlint -verbose -color
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ linters-settings:
nestif:
# minimal complexity of if statements to report, 5 by default
min-complexity: 7
gomnd:
mnd:
checks:
- case
- operation
Expand All @@ -74,7 +74,7 @@ linters:
- gofmt
- goimports
- revive
- gomnd
- mnd
- goprintffuncname
- gosec
- gosimple
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GITTAG=$(shell git describe --always --tags)
VERSION=$(GITTAG:v%=%)
LINKER_FLAGS=-s -w -X 'github.com/mongodb/terraform-provider-mongodbatlas/version.ProviderVersion=${VERSION}'

GOLANGCI_VERSION=v1.57.2
GOLANGCI_VERSION=v1.59.0 # Also update golangci-lint GH action in code-health.yml when updating this version

export PATH := $(shell go env GOPATH)/bin:$(PATH)
export SHELL := env PATH=$(PATH) /bin/bash
Expand Down
8 changes: 4 additions & 4 deletions internal/testutil/replay/hoverfly_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ func cleanupCaptureMode(t *testing.T, port int) {
}

func randomPortNumber() int {
var min int64 = 1024
var max int64 = 65536
diff := max - min
var minPort int64 = 1024
var maxPort int64 = 65536
diff := maxPort - minPort
nBig, err := rand.Int(rand.Reader, big.NewInt(diff+1))
if err != nil {
log.Fatalf("Failed to generate random number: %v", err)
}
proxyPort := int(nBig.Int64() + min)
proxyPort := int(nBig.Int64() + minPort)
return proxyPort
}

Expand Down

0 comments on commit 065af27

Please sign in to comment.