Skip to content

Commit 4a6aedf

Browse files
author
jguerreiro
committed
fix(codestyle): update to golangci 39
1 parent 65f4026 commit 4a6aedf

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

.golangci.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ linters:
1818
- gosimple
1919
- govet
2020
- ineffassign
21-
- interfacer
2221
- lll
2322
- misspell
2423
- nakedret
25-
- scopelint
2624
- staticcheck
2725
- structcheck
2826
- stylecheck
@@ -39,6 +37,7 @@ linters:
3937
- exhaustivestruct
4038
- errorlint
4139
# temporary disables
40+
- gci
4241
- gocritic
4342
- gofumpt
4443
- funlen
@@ -59,8 +58,6 @@ linters-settings:
5958
min-confidence: 0
6059
gocyclo:
6160
min-complexity: 15
62-
maligned:
63-
suggest-new: true
6461
dupl:
6562
threshold: 100
6663
goconst:
@@ -75,14 +72,3 @@ linters-settings:
7572
- opinionated
7673
- performance
7774
- style
78-
funlen:
79-
lines: 100
80-
statements: 50
81-
82-
issues:
83-
exclude:
84-
- "G402:" # Insecure TLS Config
85-
- "G404:"
86-
- "`Mapping` is a global variable"
87-
- "mnd: Magic number: 1, in <argument> detected"
88-
- "mnd: Magic number: 2, in <argument> detected"

cmd/dna-collector/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ type config struct {
2222
GitlabToken string `env:"GITLAB_TOKEN"`
2323
}
2424

25+
const MaxPipelineEvents = 100
26+
2527
func runExtract(pipeline *dnacollector.Pipeline, user string) chan dnacollector.PipelineEvent {
2628
// buffer it a bit so it won't block if this is going too fast
27-
ch := make(chan dnacollector.PipelineEvent, 100)
29+
ch := make(chan dnacollector.PipelineEvent, MaxPipelineEvents)
2830

2931
go func(eventChannel chan dnacollector.PipelineEvent) {
3032
defer close(eventChannel)

0 commit comments

Comments
 (0)