-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
37 lines (37 loc) · 3.17 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
---
run:
timeout: 5m
concurrency: 4
linters:
enable-all: true
disable:
- cyclop # calculates cyclomatic complexities of functions or packages => legit, but we prefer to use sonarqube and be non-blocking
- depguard # We do not have particular restrictions on which packages should be allowed or not
- exhaustruct # Find structs that have uninitialized fields. => We want to rely on default field initialization
- forcetypeassert # We manipulate a lot of slack api data that always need cast
- 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
- gomoddirectives # A linter that handle replace, retract, exclude directives into go.mod => Prevent us fro, using replace in go.mod
- 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
- revive # replacement for golint, force comment on Exported vars => Yes, we should force it, but let's do baby steps
- tagliatelle # A linter that handles struct tags. We want both snake_case and camelCase struct tags to decode json payloads
- wsl # Whitespace Linter - Forces you to use empty lines! => We don't care
- perfsprint # We prefer readability over performance
- maligned # Disable because they are deprecated and throw warning in logs
- interfacer # Disable because they are deprecated and throw warning in logs
- golint # Disable because they are deprecated and throw warning in logs
- scopelint # 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
- nosnakecase # Disable because they are deprecated and throw warning in logs
- varcheck # Disable because they are deprecated and throw warning in logs
- deadcode # Disable because they are deprecated and throw warning in logs
- structcheck # Disable because they are deprecated and throw warning in logs