Skip to content

Commit 6a3ff17

Browse files
author
Craig Furman
committed
Bump golangci-lint
To avoid memory leak / timeout. Fix up depguard config. Fix a formatting error. Leave one linter error in place for now, it'll be fixed in a subsequent commit, as it's a bit more complex.
1 parent ed1e990 commit 6a3ff17

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.golangci.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ linters:
1717

1818
linters-settings:
1919
depguard:
20-
list-type: blacklist
21-
include-go-root: true
22-
packages-with-error-message:
23-
- errors: 'Use github.com/sourcegraph/sourcegraph/lib/errors instead'
24-
- github.com/pkg/errors: 'Use github.com/sourcegraph/sourcegraph/lib/errors instead'
25-
- github.com/cockroachdb/errors: 'Use github.com/sourcegraph/sourcegraph/lib/errors instead'
26-
- github.com/hashicorp/go-multierror: 'Use github.com/sourcegraph/sourcegraph/lib/errors instead'
27-
- io/ioutil: 'The ioutil package has been deprecated'
20+
rules:
21+
main:
22+
deny:
23+
- pkg: "errors"
24+
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
25+
- pkg: "github.com/pkg/errors"
26+
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
27+
- pkg: "github.com/cockroachdb/errors"
28+
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
29+
- pkg: "github.com/hashicorp/go-multierror"
30+
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
31+
- pkg: "io/ioutil"
32+
desc: "The ioutil package has been deprecated"
2833
gocritic:
2934
disabled-checks:
3035
- appendAssign # Too many false positives

dev/golangci-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
66

77
mkdir -p dev/.bin
88

9-
version="1.51.2"
9+
version="1.58.1"
1010
suffix="${version}-$(go env GOOS)-$(go env GOARCH)"
1111
target="$PWD/dev/.bin/golangci-lint-${suffix}"
1212
url="https://github.com/golangci/golangci-lint/releases/download/v${version}/golangci-lint-${suffix}.tar.gz"

internal/batches/ui/task_exec_tui_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestTaskExecTUI_Integration(t *testing.T) {
5050

5151
buf := &ttyBuf{}
5252

53-
true_ := true
53+
true_ := true
5454
out := output.NewOutput(buf, output.OutputOpts{
5555
ForceTTY: &true_,
5656
ForceColor: true,
@@ -210,7 +210,7 @@ func TestProgressUpdateAfterComplete(t *testing.T) {
210210
now := time.Now()
211211
clock := func() time.Time { return now.UTC().Truncate(time.Millisecond) }
212212

213-
true_ := true
213+
true_ := true
214214
out := output.NewOutput(buf, output.OutputOpts{
215215
ForceTTY: &true_,
216216
ForceColor: true,

0 commit comments

Comments
 (0)