Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8303c41

Browse files
committed
ci: enable gocognit
And, bring the server under 300: * Removed the undocumented "disable" STUN address in favor of the --disable-direct flag.
1 parent 451ca04 commit 8303c41

File tree

13 files changed

+253
-267
lines changed

13 files changed

+253
-267
lines changed

.golangci.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ linters-settings:
77
# Gradually extend to cover more of the codebase.
88
- 'httpmw\.\w+'
99
gocognit:
10-
min-complexity: 46 # Min code complexity (def 30).
10+
min-complexity: 300
1111

1212
goconst:
1313
min-len: 4 # Min length of string consts (def 3).
@@ -118,10 +118,6 @@ linters-settings:
118118
goimports:
119119
local-prefixes: coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder
120120

121-
gocyclo:
122-
# goal: 30
123-
min-complexity: 47
124-
125121
importas:
126122
no-unaliased: true
127123

@@ -232,7 +228,9 @@ linters:
232228
- exportloopref
233229
- forcetypeassert
234230
- gocritic
235-
- gocyclo
231+
# gocyclo is essentially gocognit but worse.
232+
# - gocyclo
233+
- gocognit
236234
- goimports
237235
- gomodguard
238236
- gosec

cli/configssh.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ func sshPrepareWorkspaceConfigs(ctx context.Context, client *codersdk.Client) (r
190190
}
191191
}
192192

193-
//nolint:gocyclo
194193
func (r *RootCmd) configSSH() *clibase.Cmd {
195194
var (
196195
sshConfigFile string

0 commit comments

Comments
 (0)