Update CI configs to v0.11.25

Update lint scripts and CI configs.
This commit is contained in:
Pion
2025-08-31 15:18:28 +00:00
committed by Sean DuBois
parent d2b87034c3
commit 78e09c3e91
5 changed files with 12 additions and 26 deletions

View File

@@ -80,10 +80,8 @@ linters:
staticcheck:
checks:
- all
# "could remove embedded field", to keep it explicit!
- -QF1008
# "could use tagged switch on enum", Cases conflicts with exhaustive!
- -QF1003
- -QF1008 # "could remove embedded field", to keep it explicit!
- -QF1003 # "could use tagged switch on enum", Cases conflicts with exhaustive!
exhaustive:
default-signifies-exhaustive: true
forbidigo:
@@ -93,10 +91,6 @@ linters:
- pattern: ^os.Exit$
- pattern: ^panic$
- pattern: ^print(ln)?$
- pattern: ^testing.T.(Error|Errorf|Fatal|Fatalf|Fail|FailNow)$
pkg: ^testing$
msg: use testify/assert instead
analyze-types: true
gomodguard:
blocked:
modules:
@@ -106,12 +100,6 @@ linters:
govet:
enable:
- shadow
revive:
rules:
# Prefer 'any' type alias over 'interface{}' for Go 1.18+ compatibility
- name: use-any
severity: warning
disabled: false
misspell:
locale: US
varnamelen:
@@ -132,18 +120,15 @@ linters:
- linters:
- forbidigo
- gocognit
path: (examples|main\.go)
- linters:
- gocognit
path: _test\.go
path: (examples|main\.go|_test\.go)
- linters:
- forbidigo
path: cmd
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
- gci # Gci control golang package import order and make it always deterministic.
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
exclusions:
generated: lax

View File

@@ -27,7 +27,7 @@ var ErrUnsupportedURI = fmt.Errorf("invalid schema or transport")
// Dial connects to the address on the named network and then
// initializes Client on that connection, returning error if any.
func Dial(network, address string) (*Client, error) {
conn, err := net.Dial(network, address)
conn, err := net.Dial(network, address) //nolint: noctx
if err != nil {
return nil, err
}
@@ -94,7 +94,7 @@ func DialURI(uri *URI, cfg *DialConfig) (*Client, error) { //nolint:cyclop
}
case (uri.Scheme == SchemeTypeTURNS || uri.Scheme == SchemeTypeSTUNS) && uri.Proto == ProtoTypeTCP:
tlsCfg := cfg.TLSConfig //nolint:govet
tlsCfg := cfg.TLSConfig //nolint:govet, copylocks
tlsCfg.ServerName = uri.Host
tcpConn, err := nw.Dial("tcp", addr)

View File

@@ -25,7 +25,7 @@ func test(network string) { //nolint:cyclop
username = "user"
password = "secret"
)
conn, err := net.Dial(addr.Network(), addr.String())
conn, err := net.Dial(addr.Network(), addr.String()) // nolint: noctx
if err != nil {
log.Fatalln("failed to dial conn:", err) //nolint
}

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/pion/stun/v3
go 1.20
go 1.21
require (
github.com/pion/dtls/v3 v3.0.7

1
go.sum
View File

@@ -15,6 +15,7 @@ github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguH
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=