Repository navigation
Expand file tree
/
Copy path.golangci.yaml
More file actions
76 lines (73 loc) · 1.62 KB
/
Copy path.golangci.yaml
File metadata and controls
76 lines (73 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.v2.2.json
---
version: "2"
run:
timeout: 5m
allow-parallel-runners: true
linters:
default: none
enable:
- errcheck
- gocyclo
- gosec
- govet
- ineffassign
- misspell
- revive
- staticcheck
- unconvert
- unused
settings:
gocyclo:
min-complexity: 20
govet:
enable-all: true
disable:
- fieldalignment
- shadow
gosec:
excludes:
- G306 # published artifact files are intentionally world-readable
- G703 # CLI accepts caller-supplied filesystem paths by design
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
rules:
- path: _test\.go
linters:
- gosec
- gocyclo
- text: "stutters"
linters:
- revive
formatters:
enable:
- gofmt
# goimports deferred: local-prefix rewrite would churn existing imports in this lane.