Skip to content

Commit

Permalink
chore: upgrade golangci-lint to v1.46.2 (#9448)
Browse files Browse the repository at this point in the history
* chore: upgrade golangci-lint to v1.46.2

Because:

* Installation of golangci-lint v1.45.2 is currently broken and fails
  silently due to a redacted dependency
  (blizzy78/varnamelen#13)

This commit:

* Upgrades golangci-lint to v1.46.2

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

* fix: lint

Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>

* fix: lint

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
  • Loading branch information
cippaciong and crenshaw-dev committed Jun 13, 2022
1 parent b0e4473 commit af45491
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yaml
Expand Up @@ -61,10 +61,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.38.0
args: --timeout 10m --exclude SA5011
version: v1.46.2
args: --timeout 10m --exclude SA5011 --verbose

test-go:
name: Run unit tests for Go packages
Expand Down
2 changes: 1 addition & 1 deletion hack/installers/install-lint-tools.sh
@@ -1,4 +1,4 @@
#!/bin/bash
set -eux -o pipefail

GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.38.0
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
1 change: 1 addition & 0 deletions server/server.go
Expand Up @@ -952,6 +952,7 @@ func (a *ArgoCDServer) Authenticate(ctx context.Context) (context.Context, error
if !argoCDSettings.AnonymousUserEnabled {
return ctx, claimsErr
} else {
// nolint:staticcheck
ctx = context.WithValue(ctx, "claims", "")
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Expand Up @@ -506,7 +506,7 @@ func getTestServer(t *testing.T, anonymousEnabled bool, withFakeSSO bool) (argoc
cm.Data["users.anonymous.enabled"] = "true"
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
return // Start with a placeholder. We need the server URL before setting up the real handler.
// Start with a placeholder. We need the server URL before setting up the real handler.
}))
ts.Config.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
dexMockHandler(t, ts.URL)(w, r)
Expand Down

0 comments on commit af45491

Please sign in to comment.