Preparing report...

Report for github.com/CloudmindsRobot/dagger

A    Great!    Found 25 issues across 27 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!


gocyclo92%

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.


golint7%

Golint is a linter for Go source code.

    • dagger/backend/sessions/session.go
    • Line 9: warning: exported var Store should have comment or be unexported (golint)
    • Line 11: warning: exported function SetSession should have comment or be unexported (golint)
    • Line 19: warning: exported function GetSession should have comment or be unexported (golint)
    • dagger/backend/utils/lokiapi.go
    • Line 20: warning: exported function QueryRange should have comment or be unexported (golint)
    • Line 56: warning: exported function Labels should have comment or be unexported (golint)
    • Line 98: warning: exported function LabelValues should have comment or be unexported (golint)
    • Line 133: warning: exported function CreateOrUpdateRuleGroup should have comment or be unexported (golint)
    • Line 159: warning: exported function DeleteRuleGroup should have comment or be unexported (golint)
    • Line 185: warning: exported function LoadRules should have comment or be unexported (golint)
    • dagger/backend/utils/lokiwebsocket.go
    • Line 17: warning: exported type WsMessage should have comment or be unexported (golint)
    • Line 22: warning: exported function LokiWebsocketClient should have comment or be unexported (golint)
    • Line 44: warning: exported function WebSocketClientHandler should have comment or be unexported (golint)
    • Line 72: warning: exported function LokiWebsocketServer should have comment or be unexported (golint)
    • Line 89: warning: exported function WebSocketServerHandler should have comment or be unexported (golint)
    • Line 109: warning: exported function LokiWebsocketMessageConstruct should have comment or be unexported (golint)
    • dagger/backend/models/alert.go
    • Line 9: warning: exported type LogLabel should have comment or be unexported (golint)
    • Line 17: warning: exported method LogLabel.TableName should have comment or be unexported (golint)
    • Line 21: warning: exported type LogGroup should have comment or be unexported (golint)
    • Line 29: warning: exported method LogGroup.TableName should have comment or be unexported (golint)
    • Line 33: warning: exported type LogRule should have comment or be unexported (golint)
    • Line 49: warning: exported method LogRule.TableName should have comment or be unexported (golint)
    • Line 53: warning: exported method LogRule.BeforeDelete should have comment or be unexported (golint)
    • Line 61: warning: exported method LogRule.BeforeUpdate should have comment or be unexported (golint)
    • Line 67: warning: exported type LogUserGroup should have comment or be unexported (golint)
    • Line 77: warning: exported method LogUserGroup.TableName should have comment or be unexported (golint)
    • Line 81: warning: exported method LogUserGroup.BeforeDelete should have comment or be unexported (golint)
    • Line 86: warning: exported method LogUserGroup.BeforeUpdate should have comment or be unexported (golint)
    • Line 91: warning: exported type LogUser should have comment or be unexported (golint)
    • Line 99: warning: exported method LogUser.TableName should have comment or be unexported (golint)
    • Line 103: warning: exported type LogEventDetail should have comment or be unexported (golint)
    • Line 116: warning: exported method LogEventDetail.TableName should have comment or be unexported (golint)
    • Line 120: warning: exported type LogEvent should have comment or be unexported (golint)
    • Line 131: warning: exported method LogEvent.TableName should have comment or be unexported (golint)
    • dagger/backend/routers/router.go
    • Line 18: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported function InitRouter should have comment or be unexported (golint)
    • dagger/backend/controllers/query.go
    • Line 29: warning: comment on exported function LokiList should be of the form "LokiList ..." (golint)
    • Line 214: warning: comment on exported function LokiLabels should be of the form "LokiLabels ..." (golint)
    • Line 236: warning: comment on exported function LokiLabelValues should be of the form "LokiLabelValues ..." (golint)
    • Line 259: warning: comment on exported function LokiExport should be of the form "LokiExport ..." (golint)
    • Line 377: warning: comment on exported function LokiContext should be of the form "LokiContext ..." (golint)
    • Line 445: warning: comment on exported function LokiTail should be of the form "LokiTail ..." (golint)
    • Line 522: warning: comment on exported function TransformLogQL should be of the form "TransformLogQL ..." (golint)
    • dagger/backend/models/rule.go
    • Line 3: warning: exported type GroupYAML should have comment or be unexported (golint)
    • Line 7: warning: exported type RuleYAML should have comment or be unexported (golint)
    • Line 12: warning: exported type AlertYAML should have comment or be unexported (golint)
    • dagger/backend/middlewares/middlewares.go
    • Line 20: warning: exported function Cors should have comment or be unexported (golint)
    • Line 39: warning: exported function JWTCheck should have comment or be unexported (golint)
    • Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dagger/backend/controllers/history.go
    • Line 12: warning: comment on exported function LokiHistoryCreate should be of the form "LokiHistoryCreate ..." (golint)
    • Line 40: warning: comment on exported function LokiHistoryList should be of the form "LokiHistoryList ..." (golint)
    • Line 68: warning: comment on exported function LokiHistoryDelete should be of the form "LokiHistoryDelete ..." (golint)
    • dagger/backend/controllers/snapshot.go
    • Line 24: warning: comment on exported function LokiSnapshotList should be of the form "LokiSnapshotList ..." (golint)
    • Line 52: warning: comment on exported function LokiSnapshotDelete should be of the form "LokiSnapshotDelete ..." (golint)
    • Line 87: warning: comment on exported function LokiSnapshotCreate should be of the form "LokiSnapshotCreate ..." (golint)
    • Line 176: warning: comment on exported function LokiSnapshotDetail should be of the form "LokiSnapshotDetail ..." (golint)
    • dagger/backend/models/loki.go
    • Line 7: warning: exported type LokiMessage should have comment or be unexported (golint)
    • Line 12: warning: exported type LokiMessages should have comment or be unexported (golint)
    • Line 33: warning: exported method LogHistory.TableName should have comment or be unexported (golint)
    • Line 51: warning: exported method LogSnapshot.TableName should have comment or be unexported (golint)
    • dagger/backend/controllers/alert.go
    • Line 20: warning: comment on exported function LokiRuleList should be of the form "LokiRuleList ..." (golint)
    • Line 57: warning: exported function LokiRuleDelete should have comment or be unexported (golint)
    • Line 89: warning: comment on exported function LokiUserGroupList should be of the form "LokiUserGroupList ..." (golint)
    • Line 114: warning: exported function LokiUserGroupJoin should have comment or be unexported (golint)
    • Line 146: warning: exported function LokiUserGroupLeave should have comment or be unexported (golint)
    • Line 174: warning: comment on exported function LokiUserGroupCreate should be of the form "LokiUserGroupCreate ..." (golint)
    • Line 201: warning: exported function LokiUserGroupUpdate should have comment or be unexported (golint)
    • Line 225: warning: exported function LokiUserGroupDelete should have comment or be unexported (golint)
    • Line 245: warning: exported function LokiEventDetailList should have comment or be unexported (golint)
    • Line 254: warning: comment on exported function LokiEventList should be of the form "LokiEventList ..." (golint)
    • Line 303: warning: exported function LokiEventArchive should have comment or be unexported (golint)
    • Line 316: warning: exported function LokiEventCollect should have comment or be unexported (golint)
    • Line 399: warning: exported function LokiRuleCreate should have comment or be unexported (golint)
    • Line 457: warning: exported function LokiRuleUpdate should have comment or be unexported (golint)
    • Line 515: warning: exported function LokiRuleDownload should have comment or be unexported (golint)
    • dagger/backend/controllers/auth.go
    • Line 21: warning: exported var User should have comment or be unexported (golint)
    • Line 24: warning: comment on exported function Login should be of the form "Login ..." (golint)
    • Line 81: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 144: warning: comment on exported function GetUserInfo should be of the form "GetUserInfo ..." (golint)
    • dagger/backend/utils/alertmanager.go
    • Line 20: warning: exported var SMTPHost should have comment or be unexported (golint)
    • Line 58: warning: exported function FlushConf2Alertmanager should have comment or be unexported (golint)
    • Line 63: warning: exported function ReloadAlertmanager should have comment or be unexported (golint)
    • Line 78: warning: exported function ContructAlertmanagerConf should have comment or be unexported (golint)
    • Line 98: warning: exported function LoadAlertmanagerConf should have comment or be unexported (golint)
    • Line 121: warning: exported function Push2Alertmanager should have comment or be unexported (golint)
    • Line 135: warning: exported function DynamicAlertmanagerConf should have comment or be unexported (golint)
    • dagger/backend/utils/lokiutils.go
    • Line 27: warning: exported function Exist should have comment or be unexported (golint)
    • Line 39: warning: exported function GetLogLevelExpr should have comment or be unexported (golint)
    • Line 54: warning: exported function LogLevel should have comment or be unexported (golint)
    • Line 74: warning: exported function GenerateLevelRegex should have comment or be unexported (golint)
    • Line 116: warning: exported function SplitDateTime should have comment or be unexported (golint)
    • Line 136: warning: exported function InitSplitDateTime should have comment or be unexported (golint)
    • Line 146: warning: exported function TimeInPart should have comment or be unexported (golint)
    • Line 153: warning: exported function ShellHighlightShow should have comment or be unexported (golint)
    • Line 167: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 177: warning: exported function RegexHighlightShow should have comment or be unexported (golint)
    • Line 189: warning: exported function GetShellColor should have comment or be unexported (golint)
    • Line 211: warning: exported function GetExpr should have comment or be unexported (golint)
    • Line 219: warning: exported function GetPodExpr should have comment or be unexported (golint)
    • Line 227: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 238: warning: exported function GenerateToken should have comment or be unexported (golint)
    • Line 248: warning: exported function LdapCheck should have comment or be unexported (golint)
    • Line 331: warning: exported function Md5 should have comment or be unexported (golint)
    • Line 338: warning: exported function StructLables should have comment or be unexported (golint)
    • Line 357: warning: exported function ToYAML should have comment or be unexported (golint)
    • Line 366: warning: exported function GenerateYAML should have comment or be unexported (golint)
    • Line 395: warning: exported function String2Time should have comment or be unexported (golint)
    • Line 401: warning: exported function TimeDateValueFormatter should have comment or be unexported (golint)
    • Line 408: warning: exported function SplitDateTimeForMatrix should have comment or be unexported (golint)
    • dagger/backend/utils/zaplog.go
    • Line 31: warning: exported function TimeEncoder should have comment or be unexported (golint)
    • Line 35: warning: exported function LevelEncoder should have comment or be unexported (golint)
    • Line 39: warning: exported function Log4Zap should have comment 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!


misspell92%

Misspell Finds commonly misspelled English words