Preparing report...

Report for github.com/vidar-team/Cardinal

A+    Excellent!    Found 46 issues across 76 files

Tweet

gofmt96%

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!


gocyclo96%

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.


golint42%

Golint is a linter for Go source code.

    • Cardinal/internal/livelog/handler.go
    • Line 13: warning: exported const GlobalStream should have comment or be unexported (golint)
    • Line 16: warning: exported var Stream should have comment or be unexported (golint)
    • Line 18: warning: exported function Init should have comment or be unexported (golint)
    • Line 25: warning: exported function GlobalStreamHandler should have comment or be unexported (golint)
    • Cardinal/internal/db/managers.go
    • Line 98: warning: exported type CreateManagerOptions should have comment or be unexported (golint)
    • Line 104: warning: exported var ErrManagerAlreadyExists should have comment or be unexported (golint)
    • Line 130: warning: exported var ErrManagerNotExists should have comment or be unexported (golint)
    • Line 152: warning: exported type UpdateManagerOptions should have comment or be unexported (golint)
    • Cardinal/internal/db/bulletins.go
    • Line 54: warning: exported type CreateBulletinOptions should have comment or be unexported (golint)
    • Line 76: warning: exported var ErrBulletinNotExists should have comment or be unexported (golint)
    • Line 89: warning: exported type UpdateBulletinOptions should have comment or be unexported (golint)
    • Cardinal/internal/db/bulletins_test.go
    • Line 49: warning: context.Context should be the first parameter of a function (golint)
    • Line 58: warning: context.Context should be the first parameter of a function (golint)
    • Line 107: warning: context.Context should be the first parameter of a function (golint)
    • Line 137: warning: context.Context should be the first parameter of a function (golint)
    • Line 167: warning: context.Context should be the first parameter of a function (golint)
    • Line 184: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/install/install.go
    • Line 24: warning: comment on exported const DOCKER_ENV should be of the form "DOCKER_ENV ..." (golint)
    • Line 53: warning: exported function Init should have comment or be unexported (golint)
    • Line 179: warning: exported function InitManager should have comment or be unexported (golint)
    • Cardinal/internal/utils/const.go
    • Line 11: warning: comment on exported const DATBASE_VERSION should be of the form "DATBASE_VERSION ..." (golint)
    • Line 13: warning: exported const TITLE_CONF should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: comment on exported const STRING should be of the form "STRING ..." (golint)
    • Line 27: warning: exported const BOOLEAN should have comment (or a comment on this block) or be unexported (golint)
    • Cardinal/internal/db/flag.go
    • Line 54: warning: exported type FlagMetadata should have comment or be unexported (golint)
    • Line 60: warning: exported type CreateFlagOptions should have comment or be unexported (golint)
    • Line 114: warning: exported type GetFlagOptions should have comment or be unexported (golint)
    • Line 131: warning: exported var ErrFlagNotExists should have comment or be unexported (golint)
    • Cardinal/internal/db/flag_test.go
    • Line 128: warning: context.Context should be the first parameter of a function (golint)
    • Line 195: warning: context.Context should be the first parameter of a function (golint)
    • Line 275: warning: context.Context should be the first parameter of a function (golint)
    • Line 324: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/db/managers_test.go
    • Line 51: warning: context.Context should be the first parameter of a function (golint)
    • Line 83: warning: context.Context should be the first parameter of a function (golint)
    • Line 118: warning: context.Context should be the first parameter of a function (golint)
    • Line 184: warning: context.Context should be the first parameter of a function (golint)
    • Line 217: warning: context.Context should be the first parameter of a function (golint)
    • Line 240: warning: context.Context should be the first parameter of a function (golint)
    • Line 271: warning: context.Context should be the first parameter of a function (golint)
    • Line 288: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/dbold/mysql.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported var MySQL should have comment or be unexported (golint)
    • Line 16: warning: exported function InitMySQL should have comment or be unexported (golint)
    • Cardinal/internal/utils/utils.go
    • Line 32: warning: comment on exported function CheckPassword should be of the form "CheckPassword ..." (golint)
    • Line 38: warning: comment on exported function Sha1Encode should be of the form "Sha1Encode ..." (golint)
    • Line 46: warning: comment on exported function AddSalt should be of the form "AddSalt ..." (golint)
    • Line 51: warning: comment on exported function HmacSha1Encode should be of the form "HmacSha1Encode ..." (golint)
    • Line 58: warning: comment on exported function GenerateToken should be of the form "GenerateToken ..." (golint)
    • Line 93: warning: exported function SSHExecute should have comment or be unexported (golint)
    • Cardinal/internal/db/gameboxes.go
    • Line 49: warning: exported type GameBoxStatus should have comment or be unexported (golint)
    • Line 52: warning: exported const GameBoxStatusUp should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type SSHConfig should have comment or be unexported (golint)
    • Line 88: warning: exported type CreateGameBoxOptions should have comment or be unexported (golint)
    • Line 96: warning: exported var ErrGameBoxAlreadyExists should have comment or be unexported (golint)
    • Line 184: warning: exported var ErrGameBoxNotExists should have comment or be unexported (golint)
    • Line 211: warning: exported type UpdateGameBoxOptions should have comment or be unexported (golint)
    • Line 236: warning: exported var ErrBadGameBoxsStatus should have comment or be unexported (golint)
    • Cardinal/internal/db/teams.go
    • Line 88: warning: exported var ErrBadCredentials should have comment or be unexported (golint)
    • Line 102: warning: exported type CreateTeamOptions should have comment or be unexported (golint)
    • Line 108: warning: exported var ErrTeamAlreadyExists should have comment or be unexported (golint)
    • Line 136: warning: exported var ErrTeamNotExists should have comment or be unexported (golint)
    • Line 158: warning: exported type UpdateTeamOptions should have comment or be unexported (golint)
    • Cardinal/internal/game/flag.go
    • Line 285: warning: exported function TestAllSSH should have comment or be unexported (golint)
    • Line 322: warning: exported function TestSSH should have comment or be unexported (golint)
    • Line 344: warning: exported function GetLatestScoreRound should have comment or be unexported (golint)
    • Cardinal/internal/asteroid/handler.go
    • Line 9: warning: exported function GetAsteroidStatus should have comment or be unexported (golint)
    • Line 15: warning: exported function Attack should have comment or be unexported (golint)
    • Line 27: warning: exported function Rank should have comment or be unexported (golint)
    • Line 32: warning: exported function Status should have comment or be unexported (golint)
    • Line 47: warning: exported function Round should have comment or be unexported (golint)
    • Line 58: warning: exported function EasterEgg should have comment or be unexported (golint)
    • Line 63: warning: exported function Time should have comment or be unexported (golint)
    • Line 74: warning: exported function Clear should have comment or be unexported (golint)
    • Line 85: warning: exported function ClearAll should have comment or be unexported (golint)
    • Cardinal/internal/db/actions_test.go
    • Line 107: warning: context.Context should be the first parameter of a function (golint)
    • Line 134: warning: context.Context should be the first parameter of a function (golint)
    • Line 196: warning: context.Context should be the first parameter of a function (golint)
    • Line 230: warning: context.Context should be the first parameter of a function (golint)
    • Line 272: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/db/challenges.go
    • Line 56: warning: exported type CreateChallengeOptions should have comment or be unexported (golint)
    • Line 63: warning: exported var ErrChallengeAlreadyExists should have comment or be unexported (golint)
    • Line 91: warning: exported var ErrChallengeNotExists should have comment or be unexported (golint)
    • Line 104: warning: exported type UpdateChallengeOptions should have comment or be unexported (golint)
    • Cardinal/internal/db/challenges_test.go
    • Line 49: warning: context.Context should be the first parameter of a function (golint)
    • Line 68: warning: context.Context should be the first parameter of a function (golint)
    • Line 125: warning: context.Context should be the first parameter of a function (golint)
    • Line 159: warning: context.Context should be the first parameter of a function (golint)
    • Line 195: warning: context.Context should be the first parameter of a function (golint)
    • Line 214: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/db/logs_test.go
    • Line 46: warning: context.Context should be the first parameter of a function (golint)
    • Line 69: warning: context.Context should be the first parameter of a function (golint)
    • Line 113: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/store/store.go
    • Line 11: warning: exported function Init should have comment or be unexported (golint)
    • Line 16: warning: exported function Get should have comment or be unexported (golint)
    • Line 20: warning: exported function Set should have comment or be unexported (golint)
    • Cardinal/internal/db/gameboxes_test.go
    • Line 84: warning: context.Context should be the first parameter of a function (golint)
    • Line 113: warning: context.Context should be the first parameter of a function (golint)
    • Line 205: warning: context.Context should be the first parameter of a function (golint)
    • Line 257: warning: context.Context should be the first parameter of a function (golint)
    • Line 317: warning: context.Context should be the first parameter of a function (golint)
    • Line 369: warning: context.Context should be the first parameter of a function (golint)
    • Line 451: warning: context.Context should be the first parameter of a function (golint)
    • Line 507: warning: context.Context should be the first parameter of a function (golint)
    • Line 531: warning: context.Context should be the first parameter of a function (golint)
    • Cardinal/internal/db/logs.go
    • Line 34: warning: exported type LogLevel should have comment or be unexported (golint)
    • Line 37: warning: exported const LogLevelNormal should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type LogType should have comment or be unexported (golint)
    • Line 45: warning: exported const LogTypeHealthCheck should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported type CreateLogOptions should have comment or be unexported (golint)
    • Line 70: warning: exported var ErrBadLogLevel should have comment or be unexported (golint)
    • Line 71: warning: exported var ErrBadLogType should have comment or be unexported (golint)
    • Cardinal/internal/timer/bridge.go
    • Line 3: warning: exported var SetRankListTitle should have comment or be unexported (golint)
    • Line 4: warning: exported var SetRankList should have comment or be unexported (golint)
    • Line 5: warning: exported var CleanGameBoxStatus should have comment or be unexported (golint)
    • Line 6: warning: exported var GetLatestScoreRound should have comment or be unexported (golint)
    • Line 7: warning: exported var RefreshFlag should have comment or be unexported (golint)
    • Line 8: warning: exported var CalculateRoundScore should have comment or be unexported (golint)
    • Cardinal/internal/misc/webhook/webhook.go
    • Line 21: warning: exported const ANY_HOOK should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported function GetWebHook should have comment or be unexported (golint)
    • Line 36: warning: exported function NewWebHook should have comment or be unexported (golint)
    • Line 87: warning: exported function EditWebHook should have comment or be unexported (golint)
    • Line 147: warning: exported function DeleteWebHook should have comment or be unexported (golint)
    • Line 181: warning: exported function RefreshWebHookStore should have comment or be unexported (golint)
    • Cardinal/internal/db/actions.go
    • Line 40: warning: exported type ActionType should have comment or be unexported (golint)
    • Line 43: warning: exported const ActionTypeBeenAttack should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: exported type CreateActionOptions should have comment or be unexported (golint)
    • Line 74: warning: exported var ErrDuplicateAction should have comment or be unexported (golint)
    • Line 134: warning: exported type GetActionOptions should have comment or be unexported (golint)
    • Line 155: warning: exported var ErrActionNotExists should have comment or be unexported (golint)
    • Cardinal/internal/db/teams_test.go
    • Line 52: warning: context.Context should be the first parameter of a function (golint)
    • Line 74: warning: context.Context should be the first parameter of a function (golint)
    • Line 112: warning: context.Context should be the first parameter of a function (golint)
    • Line 184: warning: context.Context should be the first parameter of a function (golint)
    • Line 200: warning: context.Context should be the first parameter of a function (golint)
    • Line 223: warning: context.Context should be the first parameter of a function (golint)
    • Line 258: warning: context.Context should be the first parameter of a function (golint)
    • Line 274: warning: context.Context should be the first parameter of a function (golint)
    • Line 291: warning: context.Context should be the first parameter of a function (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!


misspell98%

Misspell Finds commonly misspelled English words