-
Notifications
You must be signed in to change notification settings - Fork 7
/
.golangci.yaml
90 lines (82 loc) · 1.85 KB
/
.golangci.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Golangci-lint configuration.
#
# If a line has a comment, it means it has been changed from the default.
# This helps us understand what we're tweaking and why.
run:
timeout: "5m" # Allow at least 5 minutes
issues-exit-code: 1
tests: true
allow-parallel-runners: false
allow-serial-runners: false
# go: "1.23"
issues:
exclude-use-default: true
exclude-case-sensitive: false
exclude-dirs-use-default: true
max-issues-per-linter: 50
max-same-issues: 3
new: false
fix: true
whole-files: false
output:
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
# path-prefix: # Not needed
show-stats: false
sort-results: true
linters:
disable-all: true
enable:
# The following linters are enabled by default
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
# The following linters are additional
# Bug based linters
- gosec
- sqlclosecheck
- reassign
- nilerr
- durationcheck
- bodyclose
# - contextcheck # Issue right now
# Style based linters
- promlinter
- gocritic
- gocognit
- goheader
- importas
- gci
linters-settings:
gosec:
exclude-generated: false
severity: low
confidence: low
excludes:
- G601 # Implicit memory aliasing in for loop. Fixed in Go1.22+, as such exclude.
gocognit:
min-complexity: 30
goheader:
template: |-
Copyright {{MOD-YEAR}} Canonical.
importas:
no-unaliased: false
no-extra-aliases: false
alias:
- pkg: github.com/juju/juju/rpc/params
alias: jujuparams
- pkg: github.com/canonical/jimm/v3/internal/openfga/names
alias: ofganames
- pkg: github.com/frankban/quicktest
alias: qt
gci:
skip-generated: true
custom-order: true
sections:
- standard
- default
- localmodule