update golangci-lint (#2106)

This commit is contained in:
Alessandro Ros 2023-07-24 19:59:26 +02:00 committed by GitHub
parent 1fa53b49d4
commit f30944a5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 9 deletions

View File

@ -19,7 +19,7 @@ jobs:
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
version: v1.53.3
mod-tidy:
runs-on: ubuntu-22.04

View File

@ -7,11 +7,13 @@ linters:
- gocritic
- gofmt
- gofumpt
- misspell
- lll
- misspell
- nilerr
- prealloc
- revive
- unconvert
- wastedassign
- whitespace
disable:
- errcheck

View File

@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.20-alpine3.17
LINT_IMAGE = golangci/golangci-lint:v1.52.2
LINT_IMAGE = golangci/golangci-lint:v1.53.3
NODE_IMAGE = node:16-alpine3.17
ALPINE_IMAGE = alpine:3.17
RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run

View File

@ -51,7 +51,7 @@ func TestRTSPSource(t *testing.T) {
) (*base.Response, *gortsplib.ServerStream, error) {
err := auth.Validate(ctx.Request, "testuser", "testpass", nil, nil, "IPCAM", nonce)
if err != nil {
return &base.Response{
return &base.Response{ //nolint:nilerr
StatusCode: base.StatusUnauthorized,
Header: base.Header{
"WWW-Authenticate": auth.GenerateWWWAuthenticate(nil, "IPCAM", nonce),
@ -175,7 +175,7 @@ func TestRTSPSourceNoPassword(t *testing.T) {
onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) {
err := auth.Validate(ctx.Request, "testuser", "", nil, nil, "IPCAM", nonce)
if err != nil {
return &base.Response{
return &base.Response{ //nolint:nilerr
StatusCode: base.StatusUnauthorized,
Header: base.Header{
"WWW-Authenticate": auth.GenerateWWWAuthenticate(nil, "IPCAM", nonce),

View File

@ -61,7 +61,7 @@ func newWebRTCOutgoingTrackVideo(medias media.Medias) (*webRTCOutgoingTrack, err
packets, err := encoder.Encode(tunit.OBUs, tunit.PTS)
if err != nil {
return nil
return nil //nolint:nilerr
}
for _, pkt := range packets {
@ -108,7 +108,7 @@ func newWebRTCOutgoingTrackVideo(medias media.Medias) (*webRTCOutgoingTrack, err
packets, err := encoder.Encode(tunit.Frame, tunit.PTS)
if err != nil {
return nil
return nil //nolint:nilerr
}
for _, pkt := range packets {
@ -155,7 +155,7 @@ func newWebRTCOutgoingTrackVideo(medias media.Medias) (*webRTCOutgoingTrack, err
packets, err := encoder.Encode(tunit.Frame, tunit.PTS)
if err != nil {
return nil
return nil //nolint:nilerr
}
for _, pkt := range packets {
@ -215,7 +215,7 @@ func newWebRTCOutgoingTrackVideo(medias media.Medias) (*webRTCOutgoingTrack, err
packets, err := encoder.Encode(tunit.AU, tunit.PTS)
if err != nil {
return nil
return nil //nolint:nilerr
}
for _, pkt := range packets {