From bfd98557f9320f652f52797afdbbac8d81087f4e Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Tue, 9 Aug 2022 15:42:35 -0300 Subject: [PATCH] update golangci-lint version (#7115) --- .github/workflows/golangci-lint.yml | 7 +++++-- .golangci.yml | 4 ++-- docs/Contributing/Testing-and-local-development.md | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c41c785481..8746d54f72 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -32,5 +32,8 @@ jobs: run: | # The following packages are needed to build Fleet Desktop on Ubuntu. sudo apt install -y gcc libgtk-3-dev libayatana-appindicator3-dev - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2 - make lint-go \ No newline at end of file + # Don't forget to update + # docs/Contributing/Testing-and-local-development.md when this + # version changes + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3 + make lint-go diff --git a/.golangci.yml b/.golangci.yml index c18c447b07..fb26e07635 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -18,8 +18,8 @@ linters: linters-settings: depguard: - list-type: blacklist - include-go-root: false + list-type: denylist + include-go-stdlib: false packages-with-error-message: - github.com/pkg/errors: "use ctxerr if a context.Context is available or stdlib errors.New / fmt.Errorf with the %w verb" diff --git a/docs/Contributing/Testing-and-local-development.md b/docs/Contributing/Testing-and-local-development.md index 9042c9f39a..13dda7959a 100644 --- a/docs/Contributing/Testing-and-local-development.md +++ b/docs/Contributing/Testing-and-local-development.md @@ -37,7 +37,7 @@ Check out [`/tools/osquery` directory instructions](https://github.com/fleetdm/f You must install the [`golangci-lint`](https://golangci-lint.run/) command to run `make test[-go]` or `make lint[-go]`, using: ``` -go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 +go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3 ``` Make sure it is available in your `PATH`. To execute the basic unit and integration tests, run the following from the root of the repository: