Preparing report...

Report for github.com/haozibi/leetcode-badge

(v0.4.0)

A+    Excellent!    Found 24 issues across 49 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


golint51%

Golint is a linter for Go source code.

    • internal/tools/const.go
    • Line 3: warning: exported var SVGLackData should have comment or be unexported (golint)
    • Line 20: warning: exported var SVCNotFound should have comment or be unexported (golint)
    • internal/leetcode/models2.go
    • Line 9: warning: exported type Data should have comment or be unexported (golint)
    • Line 14: warning: exported type AllNum should have comment or be unexported (golint)
    • Line 18: warning: exported type DataFollow should have comment or be unexported (golint)
    • Line 24: warning: exported var ErrUserNotExist should have comment or be unexported (golint)
    • main.go
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • internal/heatmap/chart.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 17: warning: exported function Do should have comment or be unexported (golint)
    • internal/storage/sqlite/sqlite.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported type User should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • internal/chart/chart.go
    • Line 14: warning: exported const DefaultAD should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type RankHistory should have comment or be unexported (golint)
    • internal/leetcode/send.go
    • Line 15: warning: exported function SendRaw should have comment or be unexported (golint)
    • Line 43: warning: exported function Send should have comment or be unexported (golint)
    • app/config.go
    • Line 3: warning: exported type Config should have comment or be unexported (golint)
    • Line 9: warning: exported type RedisConfig should have comment or be unexported (golint)
    • Line 14: warning: exported type MySQLConfig should have comment or be unexported (golint)
    • app/router.go
    • Line 12: warning: exported function Router should have comment or be unexported (golint)
    • Line 90: warning: exported method APP.HandlerFunc should have comment or be unexported (golint)
    • app/types.go
    • Line 5: warning: exported type BadgeType should have comment or be unexported (golint)
    • Line 8: warning: exported const BadgeTypeProfile should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported var ErrUserNotSupport should have comment or be unexported (golint)
    • internal/statics/statics.go
    • Line 10: warning: exported function GetLackSVG should have comment or be unexported (golint)
    • Line 14: warning: exported function SVGNotFound should have comment or be unexported (golint)
    • Line 18: warning: exported function TTF should have comment or be unexported (golint)
    • Line 22: warning: exported function ColorGreenBlue should have comment or be unexported (golint)
    • Line 26: warning: exported function ColorYellow should have comment or be unexported (golint)
    • Line 30: warning: exported function ColorPurpleBlue should have comment or be unexported (golint)
    • internal/leetcode/models.go
    • Line 3: warning: exported type Profile should have comment or be unexported (golint)
    • Line 13: warning: exported type SubmissionProgress should have comment or be unexported (golint)
    • Line 24: warning: exported type UserProfilePublicProfile should have comment or be unexported (golint)
    • Line 33: warning: exported type LeetCodeUserProfile should have comment or be unexported (golint)
    • Line 37: warning: exported type Locations should have comment or be unexported (golint)
    • Line 42: warning: exported type Errors should have comment or be unexported (golint)
    • Line 62: warning: exported type UserProfileData should have comment or be unexported (golint)
    • Line 67: warning: exported type MatchedUser should have comment or be unexported (golint)
    • Line 72: warning: exported type MatchedUserProfile should have comment or be unexported (golint)
    • Line 78: warning: exported type SubmitStats should have comment or be unexported (golint)
    • Line 83: warning: exported type Submission should have comment or be unexported (golint)
    • app/http.go
    • Line 12: warning: exported method APP.Badge should have comment or be unexported (golint)
    • Line 72: warning: exported method APP.Chart should have comment or be unexported (golint)
    • internal/storage/mysql/mysql.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • app/app.go
    • Line 26: warning: exported type APP should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: exported method APP.Setup should have comment or be unexported (golint)
    • Line 67: warning: exported method APP.Run should have comment or be unexported (golint)
    • app/version.go
    • Line 11: warning: exported var BuildTime should have comment or be unexported (golint)
    • Line 28: warning: exported function Version should have comment or be unexported (golint)
    • internal/alert/wx/wx.go
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 76: warning: exported type Resp should have comment or be unexported (golint)
    • app/cron.go
    • Line 18: warning: exported const CronSpec should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!