Preparing report...

Report for github.com/lstep/2fanginx

B    Not bad!    Found 11 issues across 13 files

Tweet

gofmt69%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint46%

Golint is a linter for Go source code.

    • 2fanginx/server/dbmgmt.go
    • Line 1: warning: package comment should be of the form "Package server ..." (golint)
    • Line 22: warning: exported function CreateDB should have comment or be unexported (golint)
    • 2fanginx/server/version.go
    • Line 27: warning: exported var Version should have comment or be unexported (golint)
    • Line 29: warning: exported var Build should have comment or be unexported (golint)
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • 2fanginx/pwMan/pwman.go
    • Line 1: warning: package comment should be of the form "Package pwMan ..." (golint)
    • Line 14: warning: don't use MixedCaps in package name; pwMan should be pwman (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign30%

IneffAssign detects ineffectual assignments in Go code.

    • 2fanginx/main.go
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: could not import github.com/lstep/2fanginx/cmd (invalid package name: "") (ineffassign)
    • 2fanginx/server/usermgmt.go
    • Line 36: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 37: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: could not import github.com/lstep/2fanginx/pwMan (invalid package name: "") (ineffassign)
    • Line 36: warning: could not import github.com/Songmu/prompter (invalid package name: "") (ineffassign)
    • Line 37: warning: could not import github.com/lstep/gototp (invalid package name: "") (ineffassign)
    • 2fanginx/server/cookies.go
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)
    • Line 49: warning: cannot use cookieContent (variable of type string) as http.SameSite value in struct literal (ineffassign)
    • Line 50: warning: cannot use ([]string literal) (value of type []string) as string value in struct literal (ineffassign)
    • Line 51: warning: too few values in struct literal (ineffassign)
    • Line 67: warning: cannot use cookieContent (variable of type string) as http.SameSite value in struct literal (ineffassign)
    • Line 68: warning: cannot use ([]string literal) (value of type []string) as string value in struct literal (ineffassign)
    • Line 69: warning: too few values in struct literal (ineffassign)
    • 2fanginx/database/database.go
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: could not import github.com/lstep/2fanginx/pwMan (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)
    • 2fanginx/pwMan/pwman.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/gebi/scryptauth (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)
    • 2fanginx/server/server.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: could not import github.com/lstep/2fanginx/pluginTOTP (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/throttled/throttled (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/throttled/throttled/store/memstore (invalid package name: "") (ineffassign)
    • 2fanginx/server/dbmgmt.go
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 19: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: could not import github.com/lstep/2fanginx/database (invalid package name: "") (ineffassign)
    • Line 19: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • 2fanginx/cmd/createuser.go
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: could not import github.com/lstep/2fanginx/server (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)
    • 2fanginx/pluginTOTP/auth.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: could not import github.com/lstep/2fanginx/database (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/gebi/scryptauth (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/lstep/gototp (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!