From b94488233728a2bc6cca99a19820dd71c3be957f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 6 Aug 2020 11:42:08 +0700 Subject: [PATCH 1/4] enable the asciicheck linter --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index 069b392c7..362787ba5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,6 +17,7 @@ linters-settings: linters: disable-all: true enable: + - asciicheck - deadcode - depguard - goconst From f886be4cce4d3d75c50d55297bb37462739ec869 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 6 Aug 2020 11:47:03 +0700 Subject: [PATCH 2/4] enable the gofmt linter --- .golangci.yml | 1 + integrationtests/self/self_suite_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 362787ba5..5ca81c9ae 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,6 +22,7 @@ linters: - depguard - goconst - goimports + - gofmt - gosimple - ineffassign - misspell diff --git a/integrationtests/self/self_suite_test.go b/integrationtests/self/self_suite_test.go index 837b7608d..0b17be4c9 100644 --- a/integrationtests/self/self_suite_test.go +++ b/integrationtests/self/self_suite_test.go @@ -116,7 +116,7 @@ var _ = BeforeSuite(func() { panic(err) } tlsConfig = &tls.Config{ - Certificates: []tls.Certificate{tls.Certificate{ + Certificates: []tls.Certificate{{ Certificate: [][]byte{leafCert.Raw}, PrivateKey: leafPrivateKey, }}, @@ -260,7 +260,7 @@ func generateTLSConfigWithLongCertChain(ca *x509.Certificate, caPrivateKey *rsa. rawCerts[0] = leafCert.Raw return &tls.Config{ - Certificates: []tls.Certificate{tls.Certificate{ + Certificates: []tls.Certificate{{ Certificate: rawCerts, PrivateKey: leafPrivateKey, }}, From 5d24d3b68fdfd262595b0051224b65f9fc0f0c90 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 12 Sep 2020 11:38:52 +0700 Subject: [PATCH 3/4] enable the exportloopref linter --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index 5ca81c9ae..952c0243e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,6 +20,7 @@ linters: - asciicheck - deadcode - depguard + - exportloopref - goconst - goimports - gofmt From 44140600176322c95d3af6d4fd0c222fc85ea23d Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 12 Sep 2020 11:41:04 +0700 Subject: [PATCH 4/4] update golangci-lint to v1.31 --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5ea252e08..aebb4aa9a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,4 +10,4 @@ jobs: uses: golangci/golangci-lint-action@v1 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.30 + version: v1.31