-
Notifications
You must be signed in to change notification settings - Fork 38
/
.golangci.yml
169 lines (169 loc) · 4.82 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
---
issues:
exclude-rules:
- linters:
- gochecknoinits
path: cmd/n3dr/config.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/configLDAP.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/configRepository.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/configUser.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/configRole.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/count.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/repositoriesV2.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/root.go
text: "don't use `init` function"
- linters:
- gochecknoinits
path: cmd/n3dr/sync.go
text: "don't use `init` function"
- linters:
- gocognit
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: >-
cognitive complexity 91 of func `\(\*Nexus3\).UploadSingleArtifact` is
high
- linters:
- gocognit
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: >-
cognitive complexity 38 of func
`\(artifactFiles\).mavenJarAndOtherExtensions` is high
- linters:
- gocyclo
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: >-
cyclomatic complexity 46 of func `\(\*Nexus3\).UploadSingleArtifact`
is high
- linters:
- funlen
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: Function 'UploadSingleArtifact' has too many statements
- linters:
- funlen
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: Function 'mavenJarAndOtherExtensions' has too many statements
- linters:
- maintidx
path: internal/app/n3dr/artifactsv2/upload/upload.go
text: >-
Function name: UploadSingleArtifact, Cyclomatic Complexity: 46,
Halstead Volume: 7485.94, Maintainability Index: 14
linters:
enable-all: true
disable:
- cyclop
- exhaustruct
- forbidigo
- forcetypeassert
- funlen
- gochecknoglobals
- goconst
- gocritic
- goerr113
- golint
- gomnd
- lll
- mnd
- nestif
- nlreturn
- noctx
- nonamedreturns
- paralleltest
- perfsprint
- revive
- testifylint
- testpackage
- usestdlibvars
- varnamelen
- wrapcheck
- wsl
#
# The following linters have been deprecated
#
- maligned
- ifshort
- structcheck
- exhaustivestruct
- scopelint
- deadcode
- nosnakecase
- interfacer
- varcheck
linters-settings:
depguard:
# Rules to apply.
#
# Variables:
# - File Variables
# you can still use and exclamation mark ! in front of a variable to say
# not to use it.
# Example !$test will match any file that is not a go test file.
#
# `$all` - matches all go files
# `$test` - matches all go test files
#
# - Package Variables
#
# `$gostd` - matches all of go's standard library (Pulled from `GOROOT`)
#
# Default: Only allow $gostd in all files.
rules:
# Name of a rule.
main:
# List of file globs that will match this list of settings to compare
# against.
# Default: $all
files:
- "!**/*_a _file.go"
# List of allowed packages.
allow:
- $gostd
- github.com/030/logging/pkg/logging
- github.com/030/mij
- github.com/030/n3dr/internal/app/n3dr
- github.com/030/p2iwd/pkg/p2iwd
- github.com/aws/aws-sdk-go/aws
- github.com/aws/aws-sdk-go/aws/credentials
- github.com/aws/aws-sdk-go/aws/session
- github.com/aws/aws-sdk-go/service/s3/s3manager
- github.com/go-openapi/runtime/client
- github.com/go-openapi/strfmt
- github.com/go-playground/validator/v10
- github.com/hashicorp/go-retryablehttp
- github.com/mholt/archives
- github.com/mitchellh/go-homedir
- github.com/OpenPeeDeeP
- github.com/ory/dockertest/v3
- github.com/ory/dockertest/v3/docker
- github.com/samber/lo
- github.com/sirupsen/logrus
- github.com/spf13/cobra
- github.com/spf13/viper
- github.com/stretchr/testify/assert
# Packages that are not allowed where the value is a suggestion.
deny:
# - pkg: 'github.com/sirupsen/logrus'
# desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package