batazor/go-auth

View on GitHub

Showing 99 of 99 total issues

exported function Login should have comment or be unexported
Open

func Login(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/session/session.go by golint

Header levels should only increment by one level at a time
Open

### Feature
Severity: Info
Found in README.md by markdownlint

MD001 - Header levels should only increment by one level at a time

Tags: headers

Aliases: header-increment

This rule is triggered when you skip header levels in a markdown document, for example:

# Header 1

### Header 3

We skipped out a 2nd level header in this document

When using multiple header levels, nested headers should increase by only one level at a time:

# Header 1

## Header 2

### Header 3

#### Header 4

## Another Header 2

### Another Header 3

exported var ClientSecret should have comment or be unexported
Open

    ClientSecret = utils.Getenv("OAUTH_GOOGLE_CLIENT_SECRET", "YOUR_CLIENT_SECRET")
Severity: Minor
Found in handlers/oauth/google.go by golint

exported function CheckUniqueUser should have comment or be unexported
Open

func CheckUniqueUser(w http.ResponseWriter, user userModel.User) bool {
Severity: Minor
Found in handlers/user/validation.go by golint

exported function CheckAuth should have comment or be unexported
Open

func CheckAuth(next http.Handler) http.Handler {
Severity: Minor
Found in middleware/auth.go by golint

exported function NewRefreshToken should have comment or be unexported
Open

func NewRefreshToken(timeDuration time.Duration) (string, error) {
Severity: Minor
Found in models/session/session.go by golint

don't use MixedCaps in package name; sessionModel should be sessionmodel
Open

package sessionModel
Severity: Minor
Found in models/session/types.go by golint

don't use MixedCaps in package name; userModel should be usermodel
Open

package userModel
Severity: Minor
Found in models/user/user.go by golint

exported function FindOne should have comment or be unexported
Open

func FindOne(user User) (*User, error) {
Severity: Minor
Found in models/user/user.go by golint

Trailing spaces
Open

This project adheres to [Semantic Versioning](http://semver.org/).  
Severity: Info
Found in CHANGELOG.md by markdownlint

MD009 - Trailing spaces

Tags: whitespace

Aliases: no-trailing-spaces

Parameters: br_spaces (number; default: 0)

This rule is triggered on any lines that end with whitespace. To fix this, find the line that is triggered and remove any trailing spaces from the end.

The brspaces parameter allows an exception to this rule for a specific amount of trailing spaces used to insert an explicit line break/br element. For example, set brspaces to 2 to allow exactly 2 spaces at the end of a line.

Note: you have to set brspaces to 2 or higher for this exception to take effect - you can't insert a br element with just a single trailing space, so if you set brspaces to 1, the exception will be disabled, just as if it was set to the default of 0.

Unordered list style
Open

* MongoDB
Severity: Info
Found in README.md by markdownlint

MD004 - Unordered list style

Tags: bullet, ul

Aliases: ul-style

Parameters: style ("consistent", "asterisk", "plus", "dash"; default "consistent")

This rule is triggered when the symbols used in the document for unordered list items do not match the configured unordered list style:

* Item 1
+ Item 2
- Item 3

To fix this issue, use the configured style for list items throughout the document:

* Item 1
* Item 2
* Item 3

Note: the configured list style can be a specific symbol to use (asterisk, plus, dash), or simply require that the usage be consistent within the document.

exported function Refresh should have comment or be unexported
Open

func Refresh(w http.ResponseWriter, r *http.Request) {
Severity: Minor
Found in handlers/session/session.go by golint

var userId should be userID
Open

    var userId = chi.URLParam(r, "userId")
Severity: Minor
Found in handlers/user/user.go by golint

exported const PRIVATE_KEY should have comment (or a comment on this block) or be unexported
Open

    PRIVATE_KEY = "cert/private_key.pem"
Severity: Minor
Found in models/session/session.go by golint

error should be the last type when returning multiple items
Open

func List() (error, []User) {
Severity: Minor
Found in models/user/user.go by golint

exported function CheckPasswordHash should have comment or be unexported
Open

func CheckPasswordHash(password, hash string) bool {
Severity: Minor
Found in utils/crypto/crypto.go by golint

don't use underscores in Go names; var err_str should be errStr
Open

    err_str := `{
Severity: Minor
Found in utils/logger.go by golint

exported function LogEntrySetFields should have comment or be unexported
Open

func LogEntrySetFields(r *http.Request, fields map[string]interface{}) {
Severity: Minor
Found in utils/logger.go by golint

don't use ALL_CAPS in Go names; use CamelCase
Open

    RECAPTCHA_PRIVATE_KEY string
Severity: Minor
Found in utils/recaptcha/recaptcha.go by golint
Severity
Category
Status
Source
Language