-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.golangci.yml
More file actions
63 lines (59 loc) · 1.88 KB
/
Copy path.golangci.yml
File metadata and controls
63 lines (59 loc) · 1.88 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
version: "2"
# Here is the full list of customizable features
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
linters:
enable:
- errcheck # Errcheck is a program for checking for unchecked errors in go programs.
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid.
- gosec # Inspects source code for security problems.
- govet # Vet examines Go source code and reports suspicious constructs
- ineffassign # Detects when assignments to existing variables are not used
- misspell # Finds commonly misspelled English words in comments.
- predeclared # Find code that shadows one of Go's predeclared identifiers.
- staticcheck # Set of rules from staticcheck.
- testifylint # Checks usage of github.com/stretchr/testify.
- unused # Checks Go code for unused constants, variables, functions and types
settings:
testifylint:
# Enable all checkers (https://github.com/Antonboom/testifylint#checkers).
enable-all: true
disable:
- require-error
- suite-thelper
staticcheck:
checks: ["all", "-ST1003", "-ST1005"]
gosec:
excludes:
- G306 # Don't flag write file permissions
- G401 # Allow use of md5 for non-cryptographic purposes
- G501 # Allow use of md5 for non-cryptographic purposes
- G115 # Integer conversion checks are noisy
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
rules:
- path: '(.+)_test\.go'
linters:
- gosec
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- goimports
- golines
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$