diff --git a/.golangci.yaml b/.golangci.yaml index 8f6fe3b..f21a6bc 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -8,7 +8,7 @@ linters-settings: local-prefixes: "github.com/chihaya/chihaya" gosec: excludes: - - "G404" # Allow the usage of math/rand + - "G404" # Allow the usage of math/rand linters: enable: - "bidichk" @@ -41,3 +41,10 @@ linters: - "varcheck" - "wastedassign" - "whitespace" +issues: + include: + - "EXC0012" # Exported should have comment + - "EXC0012" # Exported should have comment + - "EXC0013" # Package comment should be of form + - "EXC0014" # Comment on exported should be of form + - "EXC0015" # Should have a package comment diff --git a/bittorrent/params.go b/bittorrent/params.go index 1af1bfb..6d54d15 100644 --- a/bittorrent/params.go +++ b/bittorrent/params.go @@ -187,7 +187,7 @@ func (qp *QueryParams) String(key string) (string, bool) { return value, ok } -// Uint64 returns a uint parsed from a query. After being called, it is safe to +// Uint returns a uint parsed from a query. After being called, it is safe to // cast the uint64 to your desired length. func (qp *QueryParams) Uint(key string, bitSize int) (uint64, error) { str, exists := qp.params[key] diff --git a/cmd/chihaya/signal_unix.go b/cmd/chihaya/signal_unix.go index aaa9201..3095824 100644 --- a/cmd/chihaya/signal_unix.go +++ b/cmd/chihaya/signal_unix.go @@ -8,6 +8,8 @@ import ( "syscall" ) +// ReloadSignals are the signals that the current OS will send to the process +// when a configuration reload is requested. var ReloadSignals = []os.Signal{ syscall.SIGUSR1, }