🎨 Format GolangCI-Lint comments

This commit is contained in:
Maxim Lebedev 2022-12-26 20:09:34 +06:00
parent c6699bb312
commit e0d9212678
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
38 changed files with 80 additions and 74 deletions

View File

@ -87,7 +87,7 @@ func (h *RequestHandler) handleRender(ctx *http.RequestCtx) {
}) })
} }
//nolint: funlen //nolint:unlen
func (h *RequestHandler) handleCallback(ctx *http.RequestCtx) { func (h *RequestHandler) handleCallback(ctx *http.RequestCtx) {
ctx.SetContentType(common.MIMETextHTMLCharsetUTF8) ctx.SetContentType(common.MIMETextHTMLCharsetUTF8)

View File

@ -23,6 +23,7 @@ var (
) )
// ParseClientID parse string as client ID URL identifier. // ParseClientID parse string as client ID URL identifier.
//
//nolint:funlen,cyclop //nolint:funlen,cyclop
func ParseClientID(src string) (*ClientID, error) { func ParseClientID(src string) (*ClientID, error) {
cid := http.AcquireURI() cid := http.AcquireURI()

View File

@ -78,6 +78,7 @@ type (
) )
// TestConfig returns a valid config for tests. // TestConfig returns a valid config for tests.
//
//nolint:gomnd // testing domain can contains non-standart values //nolint:gomnd // testing domain can contains non-standart values
func TestConfig(tb testing.TB) *Config { func TestConfig(tb testing.TB) *Config {
tb.Helper() tb.Helper()

View File

@ -17,6 +17,7 @@ type Me struct {
} }
// ParseMe parse string as me URL identifier. // ParseMe parse string as me URL identifier.
//
//nolint:funlen,cyclop //nolint:funlen,cyclop
func ParseMe(raw string) (*Me, error) { func ParseMe(raw string) (*Me, error) {
id := http.AcquireURI() id := http.AcquireURI()

View File

@ -95,7 +95,6 @@ func TestScopes_MarshalJSON(t *testing.T) {
func TestScope_String(t *testing.T) { func TestScope_String(t *testing.T) {
t.Parallel() t.Parallel()
//nolint: paralleltest // false positive, in is used
for _, tc := range []struct { for _, tc := range []struct {
in domain.Scope in domain.Scope
out string out string

View File

@ -19,6 +19,7 @@ type Session struct {
} }
// TestSession returns valid random generated session for tests. // TestSession returns valid random generated session for tests.
//
//nolint:gomnd // testing domain can contains non-standart values //nolint:gomnd // testing domain can contains non-standart values
func TestSession(tb testing.TB) *Session { func TestSession(tb testing.TB) *Session {
tb.Helper() tb.Helper()

View File

@ -37,6 +37,7 @@ type (
) )
// DefaultNewTokenOptions describes the default settings for NewToken. // DefaultNewTokenOptions describes the default settings for NewToken.
//
//nolint:gochecknoglobals,gomnd //nolint:gochecknoglobals,gomnd
var DefaultNewTokenOptions = NewTokenOptions{ var DefaultNewTokenOptions = NewTokenOptions{
Expiration: 0, Expiration: 0,
@ -49,6 +50,7 @@ var DefaultNewTokenOptions = NewTokenOptions{
} }
// NewToken create a new token by provided options. // NewToken create a new token by provided options.
//
//nolint:cyclop //nolint:cyclop
func NewToken(opts NewTokenOptions) (*Token, error) { func NewToken(opts NewTokenOptions) (*Token, error) {
if opts.NonceLength == 0 { if opts.NonceLength == 0 {
@ -109,6 +111,7 @@ func NewToken(opts NewTokenOptions) (*Token, error) {
} }
// TestToken returns valid random generated token for tests. // TestToken returns valid random generated token for tests.
//
//nolint:gomnd // testing domain can contains non-standart values //nolint:gomnd // testing domain can contains non-standart values
func TestToken(tb testing.TB) *Token { func TestToken(tb testing.TB) *Token {
tb.Helper() tb.Helper()