Skip to content

Commit 870144e

Browse files
committed
fix: correct golangci-lint v2 config schema with proper formatters section
1 parent e04a0b7 commit 870144e

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

.golangci.yml

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# https://golangci-lint.run/usage/configuration
2+
version: "2"
3+
24
run:
35
timeout: 5m
46
tests: true
57
concurrency: 4
68

79
linters:
10+
default: standard
811
enable:
912
- govet
1013
- errcheck
@@ -22,36 +25,37 @@ linters:
2225
- noctx
2326
- prealloc
2427
- whitespace
28+
settings:
29+
errcheck:
30+
check-type-assertions: true
31+
check-blank: false
32+
staticcheck:
33+
checks:
34+
- all
35+
- "-QF1008" # Allow embedded structs to be referenced by field
36+
- "-ST1000" # Do not require package comments
37+
govet:
38+
enable-all: true
39+
disable:
40+
- fieldalignment
41+
revive:
42+
rules:
43+
- name: exported
44+
disabled: true
45+
- name: package-comments
46+
disabled: true
47+
48+
formatters:
49+
enable:
2550
- gofmt
2651
- goimports
27-
28-
linters-settings:
29-
errcheck:
30-
check-type-assertions: true
31-
check-blank: false
32-
staticcheck:
33-
checks:
34-
- all
35-
- "-QF1008" # Allow embedded structs to be referenced by field
36-
- "-ST1000" # Do not require package comments
37-
govet:
38-
enable-all: true
39-
disable:
40-
- fieldalignment
41-
revive:
42-
rules:
43-
- name: exported
44-
disabled: true
45-
- name: package-comments
46-
disabled: true
47-
goimports:
48-
local-prefixes: github.com/flashcatcloud
49-
50-
output:
51-
formats:
52-
- name: colored-line-number
52+
settings:
53+
goimports:
54+
module-path: github.com/flashcatcloud
5355

5456
issues:
57+
max-issues-per-linter: 50
58+
max-same-issues: 10
5559
exclude-rules:
5660
- path: _test\.go
5761
linters:
@@ -60,5 +64,3 @@ issues:
6064
- path: cmd/
6165
linters:
6266
- noctx
63-
max-issues-per-linter: 50
64-
max-same-issues: 10

0 commit comments

Comments
 (0)