Skip to content

Commit 735ed7a

Browse files
authored
Fix linter errors (#93)
1 parent 2619c30 commit 735ed7a

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

.golangci.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,49 @@ run:
33
modules-download-mode: readonly
44

55
linters-settings:
6-
goconst:
7-
min-len: 2
8-
min-occurrences: 2
96
gofmt:
107
simplify: true
118
goimports:
129
local-prefixes: github.com/mattermost/mattermost-plugin-confluence
13-
golint:
14-
min-confidence: 0
1510
govet:
1611
check-shadowing: true
1712
enable-all: true
13+
disable:
14+
- fieldalignment
1815
misspell:
1916
locale: US
2017

2118
linters:
2219
disable-all: true
2320
enable:
2421
- bodyclose
25-
- deadcode
2622
- errcheck
27-
- goconst
2823
- gocritic
2924
- gofmt
3025
- goimports
31-
- golint
3226
- gosec
3327
- gosimple
3428
- govet
3529
- ineffassign
36-
- interfacer
3730
- misspell
3831
- nakedret
32+
- revive
3933
- staticcheck
40-
- structcheck
4134
- stylecheck
4235
- typecheck
4336
- unconvert
4437
- unused
45-
- varcheck
4638
- whitespace
4739

4840
issues:
4941
exclude-rules:
5042
- path: server/manifest.go
5143
linters:
52-
- deadcode
5344
- unused
54-
- varcheck
5545
- path: server/configuration.go
5646
linters:
5747
- unused
5848
- path: _test\.go
5949
linters:
6050
- bodyclose
61-
- goconst
6251
- scopelint # https://github.com/kyoh86/scopelint/issues/4

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ require (
1111
github.com/stretchr/testify v1.6.1
1212
github.com/thoas/go-funk v0.6.0
1313
go.uber.org/atomic v1.6.0
14+
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
1415
)

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,9 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w
708708
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
709709
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
710710
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
711-
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
712711
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
712+
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=
713+
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
713714
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
714715
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
715716
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

server/service/notification.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func getNotificationChannelIDs(url, spaceKey, pageID, eventType string) []string
5151
}
5252
}
5353

54-
channelIDs := append(urlSpaceKeySubscriptionChannelIDs, urlPageIDSubscriptionChannelIDs...)
54+
var channelIDs []string
55+
channelIDs = append(channelIDs, urlSpaceKeySubscriptionChannelIDs...)
56+
channelIDs = append(channelIDs, urlPageIDSubscriptionChannelIDs...)
57+
5558
return util.Deduplicate(channelIDs)
5659
}

0 commit comments

Comments
 (0)