-
Notifications
You must be signed in to change notification settings - Fork 325
/
Copy path.golangci.yml
50 lines (46 loc) · 1.11 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
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
linters:
# enables all defaults + the below, `golangci-lint linters` to see the list of active linters.
enable:
- gofmt
- godot
- govet
# TODO: re-enable things as we have main cleaned up vs the defaults
#- stylecheck
#- goconst
#- prealloc
#- unparam
disable:
- typecheck
issues:
# Disable the default exclude list so that all excludes are explicitly
# defined in this file.
exclude-use-default: false
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- errcheck
- path: test_util\.go
linters:
- errcheck
- linters: [ staticcheck ]
text: "SA1006:"
- linters: [ unparam ]
text: 'result \d+ \(bool\) is always false'
- linters: [ errcheck ]
text: 'Error return value of `fmt.Fprintf` is not checked'
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
- nilness
- shadow
- unusedwrite
- printf
gofmt:
simplify: true
run:
timeout: 10m