forked from hashicorp/terraform-provider-nutanix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
66 lines (63 loc) · 1.99 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
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
maligned:
suggest-new: true
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
misspell:
locale: US
lll:
# Default is 120. '\t' is counted as 1 character.
# set our project to 200, as things like v3_structs with inline comments end up being a touch long
# also, for anyone using vscode, use the following configs:
# "rewrap.wrappingColumn": 200 ... requires the rewrap plugin
# "editor.rulers": [200]
line-length: 200
linters:
enable-all: true
disable:
- gocyclo
# disabled gocyclo as we do have a lot of large methods to iterate thru the large JSON specs
- dupl
# disabled dupl as we do have a lot of duplicated code between resources and their tests, which gets flagged by this
- errcheck
# errocheck disabled to silience errors here: https://travis-ci.com/nutanix/terraform-provider-nutanix/jobs/131154435
# Example error:
# nutanix/data_source_nutanix_image.go:61:7: Error return value of `d.Set` is not checked (errcheck)
# d.Set("name", utils.StringValue(resp.Status.Name))
# waiting on terraform/hashi to let us know how they want us to changle those errors
# see Error return value of `d.Set` is not checked (errcheck)
- typecheck
- gosec
- gochecknoinits
- gochecknoglobals
- funlen
- gocognit
- godox
- wsl
- nestif
- godot
- goconst
issues:
exclude:
- composite literal uses unkeyed fields
exclude-rules:
- path: _test\.go
linters:
- testpackage
# part of the golangci govet package is picking up things that go vet doesn't. Seems flaky, shutting that specific error off
run:
# which dirs to skip: they won't be analyzed;
skip-dirs:
- vendor
- future