Skip to content

Commit

Permalink
sdk-go/ci: update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdoxsey committed Sep 4, 2024
1 parent 908cdad commit 648e994
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.21.x
go-version: 1.23.x
cache: false

- uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86
with:
version: v1.55
version: v1.60.1
21 changes: 5 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
run:
deadline: 20m

linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
gci:
local-prefixes: github.com/pomerium/pomerium
custom-order: true
sections:
- standard
- default
- prefix(github.com/pomerium)
goconst:
min-len: 2
min-occurrences: 2
Expand All @@ -29,18 +30,11 @@ linters-settings:
min-complexity: 15
goimports:
local-prefixes: github.com/pomerium/pomerium
golint:
min-confidence: 0
govet:
check-shadowing: false
lll:
line-length: 160
maligned:
suggest-new: true
misspell:
locale: US
nolintlint:
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
Expand Down Expand Up @@ -149,8 +143,3 @@ issues:
text: "Potential hardcoded credentials"
linters:
- gosec

# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.34.x # use the fixed version to not introduce new linters unexpectedly
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.21.3
golang 1.23.0
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PKG := github.com/pomerium/$(NAME)

BUILDDIR := ${PREFIX}/dist
BINDIR := ${PREFIX}/bin
GOLANGCI_VERSION = v1.47.2


.PHONY: all
Expand Down
2 changes: 1 addition & 1 deletion jwks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestFetchJSONWebKeySet(t *testing.T) {
ctx, clearTimeout := context.WithTimeout(context.Background(), time.Second*10)
t.Cleanup(clearTimeout)

srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
io.WriteString(w, `{
"keys": [
{
Expand Down
2 changes: 1 addition & 1 deletion sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestVerifier_GetIdentity(t *testing.T) {
}
fmt.Fprint(w, a.Email)
})
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
b, err := json.Marshal(jwks)
assert.NoError(t, err)
fmt.Fprint(w, string(b))
Expand Down

0 comments on commit 648e994

Please sign in to comment.