Skip to content

Commit da34720

Browse files
committed
Bump golangci/golangci-lint-action
Signed-off-by: David Cassany <dcassany@suse.com>
1 parent 568e037 commit da34720

2 files changed

Lines changed: 52 additions & 26 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
with:
2020
go-version-file: go.mod
2121
- name: Analysis
22-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6
22+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
2323
with:
2424
args: -v

.golangci.yml

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,62 @@
1+
version: "2"
12
run:
23
timeout: 5m
34
tests: false
4-
issues:
5-
exclude-files:
6-
- "zz_generated_*"
75
output:
8-
formats:
9-
- format: colored-line-number
6+
formats:
7+
text:
8+
path: stdout
9+
colors: true
1010
linters:
11+
exclusions:
12+
paths:
13+
- "zz_generated_*"
14+
disable:
15+
- errcheck
1116
enable:
1217
- revive # replacement for golint
1318
- dupl # check duplicated code
1419
- goconst # check strings that can turn into constants
15-
- gofmt # check fmt
1620
- goheader # Check license headers, only checks files in current year
17-
- goimports # check imports
1821
- gocyclo # check complexity
19-
linters-settings:
20-
gocyclo:
21-
min-complexity: 20 # default is 30 which is too high
22-
goheader:
23-
template: |-
24-
Copyright © 2022 - {{ year }} SUSE LLC
25-
26-
Licensed under the Apache License, Version 2.0 (the "License");
27-
you may not use this file except in compliance with the License.
28-
You may obtain a copy of the License at
29-
30-
http://www.apache.org/licenses/LICENSE-2.0
31-
32-
Unless required by applicable law or agreed to in writing, software
33-
distributed under the License is distributed on an "AS IS" BASIS,
34-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35-
See the License for the specific language governing permissions and
36-
limitations under the License.
22+
settings:
23+
revive:
24+
rules:
25+
- name: dot-imports
26+
disabled: true
27+
goconst:
28+
min-occurrences: 9
29+
gocyclo:
30+
min-complexity: 20 # default is 30 which is too high
31+
goheader:
32+
template: |-
33+
Copyright © 2022 - {{ year }} SUSE LLC
34+
35+
Licensed under the Apache License, Version 2.0 (the "License");
36+
you may not use this file except in compliance with the License.
37+
You may obtain a copy of the License at
38+
39+
http://www.apache.org/licenses/LICENSE-2.0
40+
41+
Unless required by applicable law or agreed to in writing, software
42+
distributed under the License is distributed on an "AS IS" BASIS,
43+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44+
See the License for the specific language governing permissions and
45+
limitations under the License.
46+
staticcheck:
47+
checks:
48+
- "all"
49+
- "-ST1000"
50+
- "-ST1003"
51+
- "-ST1005"
52+
- "-ST1016"
53+
- "-ST1020"
54+
- "-ST1021"
55+
- "-ST1022"
56+
- "-QF1004"
57+
- "-QF1007"
58+
- "-QF1008"
59+
formatters:
60+
enable:
61+
- goimports
62+
- gofmt

0 commit comments

Comments
 (0)