forked from hashicorp/nomad
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.golangci.yml
More file actions
84 lines (78 loc) · 1.57 KB
/
Copy path.golangci.yml
File metadata and controls
84 lines (78 loc) · 1.57 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
77
78
79
80
81
82
83
84
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
version: "2"
run:
timeout: 10m
# Modules download mode (do not modify go.mod)
modules-download-mode: readonly
# Exclude test files
tests: false
output:
formats:
text:
path: stdout
print-linter-name: true
print-issued-lines: true
linters:
default: none
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dogsled
- durationcheck
- gocritic
- govet
- ineffassign
- misspell
- staticcheck
- unconvert
- usestdlibvars
settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false
exclude-functions:
- io.*
- fmt.*
gocritic:
disabled-checks:
- commentFormatting
- deprecatedComment
govet:
disable:
- shadow
staticcheck:
checks:
- SA4029
- SA5008
- SA9004
- ST1016
- ST1020
exclusions:
rules:
- path: (.+)\.go$
text: ifElseChain
- path: (.+)\.go$
text: singleCaseSwitch
- path: (.+)\.go$
text: assignOp
- path: (.+)\.go$
text: unlambda
paths:
- ".*\\.generated\\.go$"
- ".*bindata_assetfs\\.go$"
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
exclusions:
paths:
- ".*\\.generated\\.go$"
- ".*bindata_assetfs\\.go$"