mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
ci: enable gocognit (#9359)
And, bring the server under 300: * Removed the undocumented "disable" STUN address in favor of the --disable-direct flag.
This commit is contained in:
+6
-6
@@ -11,7 +11,7 @@ linters-settings:
|
||||
# Gradually extend to cover more of the codebase.
|
||||
- 'httpmw\.\w+'
|
||||
gocognit:
|
||||
min-complexity: 46 # Min code complexity (def 30).
|
||||
min-complexity: 300
|
||||
|
||||
goconst:
|
||||
min-len: 4 # Min length of string consts (def 3).
|
||||
@@ -122,10 +122,6 @@ linters-settings:
|
||||
goimports:
|
||||
local-prefixes: coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder
|
||||
|
||||
gocyclo:
|
||||
# goal: 30
|
||||
min-complexity: 47
|
||||
|
||||
importas:
|
||||
no-unaliased: true
|
||||
|
||||
@@ -236,7 +232,11 @@ linters:
|
||||
- exportloopref
|
||||
- forcetypeassert
|
||||
- gocritic
|
||||
- gocyclo
|
||||
# gocyclo is may be useful in the future when we start caring
|
||||
# about testing complexity, but for the time being we should
|
||||
# create a good culture around cognitive complexity.
|
||||
# - gocyclo
|
||||
- gocognit
|
||||
- goimports
|
||||
- gomodguard
|
||||
- gosec
|
||||
|
||||
Reference in New Issue
Block a user