-
Notifications
You must be signed in to change notification settings - Fork 28
/
.golangci.yml
64 lines (61 loc) · 1.54 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
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2024 Datadog, Inc.
run:
timeout: 5m
tests: false
linters:
# disable all linters by default
disable-all: true
enable:
# default linters
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# extra linters
- bodyclose
- dogsled
- godox
- gofmt
- goimports
- goprintffuncname
- gosec
- misspell
- nakedret
- prealloc
- revive
- rowserrcheck
- stylecheck
- unconvert
- unparam
- whitespace
- wsl
- gocritic
issues:
exclude-use-default: false
exclude:
# gosec
- Subprocess launch(ed with variable|ing should be audited)
- Expect file permissions to be 0600 or less
- Blocklisted import `crypto/md5`
- weak cryptographic primitive
- weak random number generator
- memory aliasing in for loop
- file inclusion via variable
- integer overflow conversion # revisit this. existing usages are safe
# golint
- (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
exclude-rules:
- linters:
- revive
text: "unused-parameter:|and that stutters;|unexported-return:"
- linters:
- stylecheck
text: at least one file in a package should have a package comment
output:
sort-results: true