-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
35 lines (35 loc) · 2.83 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
run:
timeout: 5m
concurrency: 4
go: "1.17"
linters:
enable-all: true
disable:
- cyclop # calculates cyclomatic complexities of functions or packages => legit, but we prefer to use sonarqube and be non-blocking
- exhaustruct # Find structs that have uninitialized fields. => We want to rely on default field initialization
- funlen # checks for long functions => legit, but we prefer to use sonarqube and be non-blocking
- gci # Control golang package import order and make it always deterministic. => We use goimport which is native to most IDEs
- gochecknoglobals # Check that no globals are present in Go code. => We want to use global variables in some situations
- gochecknoinits # Check that no init functions are present in Go code. => We want to use init functions
- gocognit # Calculates cognitive complexities of functions => legit, but we prefer to use sonarqube and be non-blocking
- godox # Search for TODO/BUG/FIXME => Prevent us from using any of these words
- goerr113 # check the errors handling expressions => Is a little extreme
- gomnd # Magic number detector for Go. => We don't care
- nestif # Detect deeply nested if statements in Go source code => legit, but we prefer to use sonarqube and be non-blocking
- nlreturn # Checks for a new line before return and branch statements. => We don't care
- prealloc # find slice declarations that could potentially be preallocated. => Much complexity for small interest
- tagliatelle # A linter that handles struct tags. => Too many false positive errors
- wsl # Whitespace Linter - Forces you to use empty lines! => We don't care
- wrapcheck # A Go linter to check that errors from external packages are wrapped => A bit too annoying
- exhaustive # We don't want to force struct exhaustive
- maligned # Disable because they are deprecated and throw warning in logs
- interfacer # Disable because they are deprecated and throw warning in logs
- scopelint # Disable because they are deprecated and throw warning in logs
- golint # Disable because they are deprecated and throw warning in logs
- exhaustivestruct # Disable because they are deprecated and throw warning in logs
- ifshort # Disable because they are deprecated and throw warning in logs
- dupl # Disable because they are deprecated and throw warning in logs
- deadcode # Disable because they are deprecated and throw warning in logs
- varcheck # Disable because they are deprecated and throw warning in logs
- structcheck # Disable because they are deprecated and throw warning in logs
- nosnakecase # Disable because they are deprecated and throw warning in logs