Skip to content

Commit 672f76c

Browse files
authored
Update deps (#25)
1 parent a12c199 commit 672f76c

File tree

7 files changed

+170
-223
lines changed

7 files changed

+170
-223
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,93 +3,57 @@ name: Test
33
on:
44
push:
55
branches:
6-
- main
7-
tags:
8-
- '*'
6+
- main
97
pull_request:
108
branches:
11-
- main
9+
- main
10+
11+
concurrency:
12+
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
13+
cancel-in-progress: true
1214

1315
jobs:
1416
lint:
1517
runs-on: 'ubuntu-latest'
1618

1719
steps:
18-
- uses: 'actions/checkout@v3'
20+
- uses: 'actions/checkout@v4'
1921

20-
- uses: 'actions/setup-go@v3'
21-
with:
22-
go-version: '1.14'
22+
- uses: 'actions/setup-go@v5'
23+
with:
24+
cache: false
25+
go-version-file: 'go.mod'
2326

24-
- uses: 'golangci/golangci-lint-action@v3'
25-
with:
26-
version: 'v1.50.1'
27-
only-new-issues: true
28-
skip-cache: true
29-
skip-pkg-cache: true
30-
skip-build-cache: true
31-
args: >-
32-
--enable=${{ join(fromJson('[
33-
"asciicheck",
34-
"bidichk",
35-
"bodyclose",
36-
"containedctx",
37-
"depguard",
38-
"dogsled",
39-
"errcheck",
40-
"errchkjson",
41-
"errname",
42-
"errorlint",
43-
"exhaustive",
44-
"exportloopref",
45-
"forcetypeassert",
46-
"godot",
47-
"gofumpt",
48-
"goheader",
49-
"goimports",
50-
"gomodguard",
51-
"goprintffuncname",
52-
"gosec",
53-
"gosimple",
54-
"govet",
55-
"ifshort",
56-
"ineffassign",
57-
"makezero",
58-
"noctx",
59-
"nolintlint",
60-
"prealloc",
61-
"predeclared",
62-
"revive",
63-
"sqlclosecheck",
64-
"staticcheck",
65-
"stylecheck",
66-
"tenv",
67-
"thelper",
68-
"tparallel",
69-
"typecheck",
70-
"unconvert",
71-
"unused",
72-
"whitespace",
73-
]'), ',') }}
74-
--max-issues-per-linter=0
75-
--max-same-issues=0
76-
--timeout=5m
27+
- uses: 'golangci/golangci-lint-action@v4'
28+
with:
29+
version: 'v1.57.2'
30+
skip-cache: true
7731

7832
test:
7933
strategy:
8034
matrix:
8135
platform:
82-
- 'macos-latest'
83-
- 'ubuntu-latest'
84-
- 'windows-latest'
36+
- 'macos-latest'
37+
- 'ubuntu-latest'
38+
- 'windows-latest'
39+
fail-fast: false
8540

8641
runs-on: '${{ matrix.platform }}'
8742

8843
steps:
89-
- uses: 'actions/checkout@v3'
90-
91-
- uses: 'actions/setup-go@v3'
92-
with:
93-
go-version: '1.14'
94-
95-
- run: 'make test-acc'
44+
- uses: 'actions/checkout@v4'
45+
46+
- uses: 'actions/setup-go@v5'
47+
with:
48+
cache: false
49+
go-version-file: 'go.mod'
50+
51+
- shell: 'bash'
52+
run: |-
53+
go test \
54+
-count=1 \
55+
-race \
56+
-shuffle=on \
57+
-timeout=5m \
58+
-vet=all \
59+
./...

.golangci.yml

Lines changed: 110 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1+
# Copyright 2023 The Authors (see AUTHORS file)
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
run:
216
# default: '1m'
317
timeout: '5m'
418

519
# default: []
6-
build-tags: []
20+
build-tags:
21+
- 'all'
22+
23+
# default: []
24+
exclude-dirs:
25+
- 'third_party'
26+
27+
# default: true
28+
skip-dirs-use-default: false
729

830
# default: ''
931
modules-download-mode: 'readonly'
@@ -13,107 +35,103 @@ run:
1335

1436
linters:
1537
enable:
16-
- 'asasalint'
17-
- 'asciicheck'
18-
- 'bidichk'
19-
- 'bodyclose'
20-
- 'containedctx'
21-
- 'contextcheck'
22-
- 'cyclop'
23-
- 'decorder'
24-
- 'depguard'
25-
- 'dogsled'
26-
- 'dupl'
27-
- 'dupword'
28-
- 'durationcheck'
29-
- 'errcheck'
30-
- 'errchkjson'
31-
- 'errname'
32-
- 'errorlint'
33-
- 'execinquery'
34-
- 'exhaustive'
35-
- 'exhaustruct'
36-
- 'exportloopref'
37-
- 'forbidigo'
38-
- 'forcetypeassert'
39-
- 'funlen'
40-
- 'gci'
41-
- 'gochecknoglobals'
42-
- 'gochecknoinits'
43-
- 'gocognit'
44-
- 'goconst'
45-
- 'gocritic'
46-
- 'gocyclo'
47-
- 'godot'
48-
- 'godox'
49-
- 'goerr113'
50-
- 'gofumpt'
51-
- 'goheader'
52-
- 'goimports'
53-
- 'gomnd'
54-
- 'gomoddirectives'
55-
- 'gomodguard'
56-
- 'goprintffuncname'
57-
- 'gosec'
58-
- 'gosimple'
59-
- 'govet'
60-
- 'grouper'
61-
- 'importas'
62-
- 'ineffassign'
63-
- 'interfacebloat'
64-
- 'ireturn'
65-
- 'lll'
66-
- 'loggercheck'
67-
- 'maintidx'
68-
- 'makezero'
69-
- 'misspell'
70-
- 'nakedret'
71-
- 'nestif'
72-
- 'nilerr'
73-
- 'nilnil'
74-
- 'nlreturn'
75-
- 'noctx'
76-
- 'nolintlint'
77-
- 'nonamedreturns'
78-
- 'nosprintfhostport'
79-
- 'paralleltest'
80-
- 'prealloc'
81-
- 'predeclared'
82-
- 'promlinter'
83-
- 'reassign'
84-
- 'revive'
85-
- 'rowserrcheck'
86-
- 'sqlclosecheck'
87-
- 'staticcheck'
88-
- 'stylecheck'
89-
- 'tagliatelle'
90-
- 'tenv'
91-
- 'testableexamples'
92-
- 'testpackage'
93-
- 'thelper'
94-
- 'tparallel'
95-
- 'typecheck'
96-
- 'unconvert'
97-
- 'unparam'
98-
- 'unused'
99-
- 'usestdlibvars'
100-
- 'varnamelen'
101-
- 'wastedassign'
102-
- 'whitespace'
103-
- 'wrapcheck'
104-
- 'wsl'
38+
- 'asasalint'
39+
- 'asciicheck'
40+
- 'bidichk'
41+
- 'bodyclose'
42+
- 'containedctx'
43+
- 'dupword'
44+
- 'durationcheck'
45+
- 'errcheck'
46+
- 'errchkjson'
47+
- 'errname'
48+
- 'errorlint'
49+
- 'execinquery'
50+
- 'exhaustive'
51+
- 'exportloopref'
52+
- 'forcetypeassert'
53+
- 'gci'
54+
- 'gocheckcompilerdirectives'
55+
- 'godot'
56+
- 'gofmt'
57+
- 'gofumpt'
58+
- 'goheader'
59+
- 'goimports'
60+
- 'goprintffuncname'
61+
- 'gosec'
62+
- 'gosimple'
63+
- 'govet'
64+
- 'importas'
65+
- 'ineffassign'
66+
- 'loggercheck'
67+
- 'makezero'
68+
- 'mirror'
69+
- 'misspell'
70+
- 'nilerr'
71+
- 'noctx'
72+
- 'nolintlint'
73+
- 'nosprintfhostport'
74+
- 'paralleltest'
75+
- 'prealloc'
76+
- 'predeclared'
77+
- 'protogetter'
78+
- 'rowserrcheck'
79+
- 'sloglint'
80+
- 'spancheck'
81+
- 'sqlclosecheck'
82+
- 'staticcheck'
83+
- 'stylecheck'
84+
- 'tenv'
85+
- 'thelper'
86+
- 'typecheck'
87+
- 'unconvert'
88+
- 'unused'
89+
- 'wastedassign'
90+
- 'whitespace'
91+
- 'wrapcheck'
10592

10693
issues:
10794
# default: []
10895
exclude:
109-
- '^SA3000:' # staticcheck: not required in Go 11.4+
96+
- '^G102:' # gosec: we have to bind to all ifaces in Cloud Run services
97+
98+
# default: []
99+
exclude-rules:
100+
# Exclude test files from certain linters
101+
- path: '_test.go'
102+
linters:
103+
- 'wrapcheck'
110104

111105
# default: 50
112106
max-issues-per-linter: 0
113107

114108
# default: 3
115109
max-same-issues: 0
116110

111+
gci:
112+
sections:
113+
- 'standard'
114+
- 'default'
115+
- 'blank'
116+
- 'dot'
117+
118+
skip-generated: true
119+
custom-order: true
120+
121+
gofumpt:
122+
# default: false
123+
extra-rules: true
124+
125+
sloglint:
126+
# default: false
127+
context-only: true
128+
# default: false
129+
static-msg: false
130+
# default: '' (snake, kebab, camel, pascal)
131+
key-naming-case: 'snake'
132+
# default: false
133+
args-on-sep-lines: true
134+
117135
severity:
118136
# default: ''
119-
default-severity: error
137+
default-severity: 'error'

0 commit comments

Comments
 (0)