[CI] Add linters: asciicheck, nolintlint and unconvert (#978)
parent
4db5807bac
commit
87053c9312
|
@ -14,6 +14,7 @@ linters-settings:
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
|
- asciicheck
|
||||||
- goconst
|
- goconst
|
||||||
- gocyclo
|
- gocyclo
|
||||||
- godot
|
- godot
|
||||||
|
@ -23,7 +24,9 @@ linters:
|
||||||
- interfacer
|
- interfacer
|
||||||
- maligned
|
- maligned
|
||||||
- misspell
|
- misspell
|
||||||
|
- nolintlint
|
||||||
- prealloc
|
- prealloc
|
||||||
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
- whitespace
|
- whitespace
|
||||||
|
|
||||||
|
|
1
go.mod
1
go.mod
|
@ -16,7 +16,6 @@ require (
|
||||||
github.com/go-ldap/ldap/v3 v3.1.8
|
github.com/go-ldap/ldap/v3 v3.1.8
|
||||||
github.com/go-sql-driver/mysql v1.5.0
|
github.com/go-sql-driver/mysql v1.5.0
|
||||||
github.com/golang/mock v1.4.3
|
github.com/golang/mock v1.4.3
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
|
|
||||||
github.com/lib/pq v1.5.1
|
github.com/lib/pq v1.5.1
|
||||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible
|
github.com/mattn/go-sqlite3 v2.0.3+incompatible
|
||||||
github.com/onsi/ginkgo v1.10.3 // indirect
|
github.com/onsi/ginkgo v1.10.3 // indirect
|
||||||
|
|
|
@ -176,7 +176,7 @@ func hasUserBeenInactiveTooLong(ctx *middlewares.AutheliaCtx) (bool, error) { //
|
||||||
}
|
}
|
||||||
|
|
||||||
// verifySessionCookie verifies if a user is identified by a cookie.
|
// verifySessionCookie verifies if a user is identified by a cookie.
|
||||||
func verifySessionCookie(ctx *middlewares.AutheliaCtx, targetURL *url.URL, userSession *session.UserSession, refreshProfile bool, refreshProfileInterval time.Duration) (username string, groups []string, authLevel authentication.Level, err error) { //nolint:unparam
|
func verifySessionCookie(ctx *middlewares.AutheliaCtx, targetURL *url.URL, userSession *session.UserSession, refreshProfile bool, refreshProfileInterval time.Duration) (username string, groups []string, authLevel authentication.Level, err error) {
|
||||||
// No username in the session means the user is anonymous.
|
// No username in the session means the user is anonymous.
|
||||||
isUserAnonymous := userSession.Username == ""
|
isUserAnonymous := userSession.Username == ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue