-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
128 lines (116 loc) · 2.72 KB
/
.golangci.yml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
---
run:
timeout: 5m
issues-exit-code: 1
tests: true
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
# default is "colored-line-number"
formats:
- format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# make issues output unique by line, default is true
uniq-by-line: true
# add a prefix to the output file references; default is no prefix
# path-prefix: ""
# sorts results by: filepath, line and column
sort-results: false
# all available settings of specific linters
linters-settings:
errcheck:
check-type-assertions: true
check-blank: false
cyclop:
max-complexity: 30
package-average: 0.0
skip-tests: false
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/hashicorp-forge
gofumpt:
extra-rules: false
gosec:
excludes:
# Don't worry about decompression bombs, not relevant for our usage of zip
- G110
# Don't worry about zip file traversals
- G305
# Don't worry about casting int -> uint
- G115
config:
G306:
# allow creating files with 0755 permissions
"0755"
interfacebloat:
max: 12
nlreturn:
# Size of the block (including return statement that is still "OK")
block-size: 2
revive:
# see https://github.com/mgechev/revive#available-rules for details.
ignore-generated-header: true
severity: warning
linters:
enable-all: true
disable:
- containedctx
- depguard
- dogsled
- dupl
- errname
- errorlint
- execinquery
- exhaustruct
- fatcontext
- forbidigo
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
# disabled for now
- gocritic
- gocyclo
# disabled for now
- godox
- err113
- gofmt
- goheader
- gomnd
- gomoddirectives # until we remove our go-cty fork
- importas
- ireturn
- lll
- loggercheck
- maintidx
- musttag
- mnd
- nakedret
- nestif
- nonamedreturns
- nosprintfhostport
- predeclared
- promlinter
- rowserrcheck
- sqlclosecheck
- tagliatelle
- testableexamples
- testpackage
# disabled because it's not friendly with the terraform test helper
- tparallel
- varnamelen
- wrapcheck
- wsl
fast: false
severity:
case-sensitive: false