Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 75 additions & 64 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,95 @@ version: "2"

linters:
enable:
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dupl
- errorlint
- gochecknoinits
- gocritic
- lll
- misspell
- modernize
- nilerr
- prealloc
- predeclared
- reassign
- revive
- usestdlibvars
- unconvert
- tparallel
- wastedassign
- whitespace
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dupl
- errorlint
- gochecknoinits
- gocritic
- lll
- misspell
- modernize
- nilerr
- prealloc
- predeclared
- reassign
- revive
- usestdlibvars
- unconvert
- tparallel
- wastedassign
- whitespace

settings:
errcheck:
exclude-functions:
- io.Copy
- (io.Closer).Close
- (io.Writer).Write
- (hash.Hash).Write
- (net.Conn).Close
- (net.Conn).SetReadDeadline
- (net.Conn).SetWriteDeadline
- (*net.TCPConn).SetKeepAlive
- (*net.TCPConn).SetKeepAlivePeriod
- (*net.TCPConn).SetNoDelay
- (net.Listener).Close
- (net.PacketConn).Close
- (net.PacketConn).SetReadDeadline
- (net.PacketConn).SetWriteDeadline
- (net/http.ResponseWriter).Write
- (*net/http.Server).Serve
- (*net/http.Server).ServeTLS
- (*net/http.Server).Shutdown
- os.Chdir
- os.Mkdir
- os.MkdirAll
- os.Remove
- os.RemoveAll
- os.Setenv
- os.Unsetenv
- (*os.File).WriteString
- (*os.File).Close
- (github.com/datarhei/gosrt.Conn).Close
- (github.com/datarhei/gosrt.Conn).SetReadDeadline
- (github.com/datarhei/gosrt.Conn).SetWriteDeadline
- (*github.com/bluenviron/gortsplib/v5.Client).Close
- (*github.com/bluenviron/gortsplib/v5.Server).Close
- (*github.com/bluenviron/gortsplib/v5.ServerSession).Close
- (*github.com/bluenviron/gortsplib/v5.ServerStream).Close
- (*github.com/bluenviron/gortsplib/v5.ServerConn).Close
- io.Copy
- (io.Closer).Close
- (io.Writer).Write
- (hash.Hash).Write
- (net.Conn).Close
- (net.Conn).SetReadDeadline
- (net.Conn).SetWriteDeadline
- (*net.TCPConn).SetKeepAlive
- (*net.TCPConn).SetKeepAlivePeriod
- (*net.TCPConn).SetNoDelay
- (net.Listener).Close
- (net.PacketConn).Close
- (net.PacketConn).SetReadDeadline
- (net.PacketConn).SetWriteDeadline
- (net/http.ResponseWriter).Write
- (*net/http.Server).Serve
- (*net/http.Server).ServeTLS
- (*net/http.Server).Shutdown
- os.Chdir
- os.Mkdir
- os.MkdirAll
- os.Remove
- os.RemoveAll
- os.Setenv
- os.Unsetenv
- (*os.File).WriteString
- (*os.File).Close
- (github.com/datarhei/gosrt.Conn).Close
- (github.com/datarhei/gosrt.Conn).SetReadDeadline
- (github.com/datarhei/gosrt.Conn).SetWriteDeadline
- (*github.com/bluenviron/gortsplib/v5.Client).Close
- (*github.com/bluenviron/gortsplib/v5.Server).Close
- (*github.com/bluenviron/gortsplib/v5.ServerSession).Close
- (*github.com/bluenviron/gortsplib/v5.ServerStream).Close
- (*github.com/bluenviron/gortsplib/v5.ServerConn).Close

govet:
enable-all: true
disable:
- fieldalignment
- reflectvaluecompare
- fieldalignment
- reflectvaluecompare
settings:
shadow:
strict: true

modernize:
disable:
- reflecttypefor
- stringsbuilder
- testingcontext
- reflecttypefor
- stringsbuilder
- testingcontext

revive:
enable-default-rules: true
rules:
- name: redundant-import-alias

exclusions:
rules:
- linters:
- lll
source: "^\\s*// https?://"

formatters:
enable:
- gofmt
- gofumpt
- goimports
- gofmt
- gofumpt
- goimports