Skip to content

Commit

Permalink
lint bump
Browse files Browse the repository at this point in the history
  • Loading branch information
vladopajic committed Aug 28, 2024
1 parent 00b4d45 commit 2cf4363
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
version: v1.60.3
- name: go mod tidy check
uses: katexochen/go-tidy-check@v2
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ linters:
- containedctx
- contextcheck
- cyclop
- copyloopvar
- decorder
- dogsled
- dupl
Expand All @@ -21,7 +22,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- forbidigo
- forcetypeassert
- funlen
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO ?= go
GOBIN ?= $$($(GO) env GOPATH)/bin
GOLANGCI_LINT ?= $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.59.1
GOLANGCI_LINT_VERSION ?= v1.60.3

# Code tidy
.PHONY: tidy
Expand Down
6 changes: 3 additions & 3 deletions pkg/testcoverage/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ func randStats(localPrefix string, minc, maxc int) []coverage.Stats {
}
}

func makeCoverageGenFn(min, max int) func() (total, covered int64) {
func makeCoverageGenFn(minc, maxc int) func() (total, covered int64) {
return func() (int64, int64) {
tc := rand.Intn(max-min+1) + min
tc := rand.Intn(maxc-minc+1) + minc
if tc == 0 {
return 0, 0
}
Expand All @@ -59,7 +59,7 @@ func makeCoverageGenFn(min, max int) func() (total, covered int64) {
total := int64(float64(100*covered) / float64(tc))

cp := coverage.CoveredPercentage(total, covered)
if cp >= min && cp <= max {
if cp >= minc && cp <= maxc {
return total, covered
}
}
Expand Down

0 comments on commit 2cf4363

Please sign in to comment.