Skip to content

Commit

Permalink
[CI] Add linters: asciicheck, nolintlint and unconvert (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
nightah committed May 5, 2020
1 parent 4db5807 commit 87053c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Expand Up @@ -14,6 +14,7 @@ linters-settings:

linters:
enable:
- asciicheck
- goconst
- gocyclo
- godot
Expand All @@ -23,7 +24,9 @@ linters:
- interfacer
- maligned
- misspell
- nolintlint
- prealloc
- unconvert
- unparam
- whitespace

Expand Down
1 change: 0 additions & 1 deletion go.mod
Expand Up @@ -16,7 +16,6 @@ require (
github.com/go-ldap/ldap/v3 v3.1.8
github.com/go-sql-driver/mysql v1.5.0
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/mattn/go-sqlite3 v2.0.3+incompatible
github.com/onsi/ginkgo v1.10.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion internal/handlers/handler_verify.go
Expand Up @@ -176,7 +176,7 @@ func hasUserBeenInactiveTooLong(ctx *middlewares.AutheliaCtx) (bool, error) { //
}

// 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.
isUserAnonymous := userSession.Username == ""

Expand Down

0 comments on commit 87053c9

Please sign in to comment.