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

Skip to content

Commit df22980

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 8e5e6f0 commit df22980

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
@@ -11,7 +11,7 @@ linters-settings:
1111
# Gradually extend to cover more of the codebase.
1212
- 'httpmw\.\w+'
1313
gocognit:
14-
min-complexity: 46 # Min code complexity (def 30).
14+
min-complexity: 300
1515

1616
goconst:
1717
min-len: 4 # Min length of string consts (def 3).
@@ -122,10 +122,6 @@ linters-settings:
122122
goimports:
123123
local-prefixes: coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder
124124

125-
gocyclo:
126-
# goal: 30
127-
min-complexity: 47
128-
129125
importas:
130126
no-unaliased: true
131127

@@ -236,7 +232,9 @@ linters:
236232
- exportloopref
237233
- forcetypeassert
238234
- gocritic
239-
- gocyclo
235+
# gocyclo is essentially gocognit but worse.
236+
# - gocyclo
237+
- gocognit
240238
- goimports
241239
- gomodguard
242240
- 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)