-
Notifications
You must be signed in to change notification settings - Fork 289
/
.golangci.yml
57 lines (56 loc) · 1.63 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
issues:
exclude-use-default: false
exclude:
# Read more: https://github.com/kyoh86/scopelint/issues/4
- Using the variable on range scope `tc` in function literal
# EXC0001 errcheck: source: https://github.com/kubernetes-sigs/controller-runtime/blob/master/.golangci.yml#L94
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# EXC0008 gosec: Duplicated errcheck checks
- (G104|G307)
# G505: Blocklisted import crypto/sha1: weak cryptographic primitive
# This is used just for hashing in ArgoCD plugin
- G505
run:
tests: true
build-tags:
- integration
- migration
skip-files:
- ".*\\.generated\\.go$"
linters:
disable-all: true
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- revive
- gofmt
- misspell
- gochecknoinits
- unparam
- exportloopref
- gosec
- goimports
- whitespace
- bodyclose
- gocyclo
fast: false
linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/kubeshop/botkube
gocyclo:
# https://github.com/kubeshop/botkube/issues/745
# Merging slack and discord test cases increased cyclo due to if conditions
min-complexity: 55
revive:
rules:
# Disable warns about capitalized and ended with punctuation error messages
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
- name: error-strings
disabled: true