Preparing report...

Report for github.com/timonwong/prometheus-webhook-dingtalk

A+    Excellent!    Found 12 issues across 23 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!


gocyclo95%

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.


golint52%

Golint is a linter for Go source code.

    • prometheus-webhook-dingtalk/notifier/notification.go
    • Line 22: warning: exported type DingNotificationBuilder should have comment or be unexported (golint)
    • Line 29: warning: exported function NewDingNotificationBuilder should have comment or be unexported (golint)
    • Line 60: warning: exported method DingNotificationBuilder.Build should have comment or be unexported (golint)
    • Line 89: warning: exported function SendNotification should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/web/apiv1/api.go
    • Line 32: warning: exported type API should have comment or be unexported (golint)
    • Line 41: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 58: warning: exported method API.Routes should have comment or be unexported (golint)
    • Line 212: warning: exported type RuntimeInfo should have comment or be unexported (golint)
    • Line 232: warning: exported type VersionInfo should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/web/dingtalk/dingtalk.go
    • Line 21: warning: exported type API should have comment or be unexported (golint)
    • Line 32: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 38: warning: exported method API.Update should have comment or be unexported (golint)
    • Line 53: warning: exported method API.Routes should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/web/web.go
    • Line 64: warning: exported type VersionInfo should have comment or be unexported (golint)
    • Line 66: warning: exported type Handler should have comment or be unexported (golint)
    • Line 85: warning: exported function New should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/pkg/models/dingtalk.go
    • Line 3: warning: exported type DingTalkNotificationResponse should have comment or be unexported (golint)
    • Line 8: warning: exported type DingTalkNotification should have comment or be unexported (golint)
    • Line 17: warning: exported type DingTalkNotificationText should have comment or be unexported (golint)
    • Line 22: warning: exported type DingTalkNotificationLink should have comment or be unexported (golint)
    • Line 29: warning: exported type DingTalkNotificationMarkdown should have comment or be unexported (golint)
    • Line 34: warning: exported type DingTalkNotificationAt should have comment or be unexported (golint)
    • Line 39: warning: exported type DingTalkNotificationActionCard should have comment or be unexported (golint)
    • Line 49: warning: exported type DingTalkNotificationButton should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/internal/compat030/builder.go
    • Line 11: warning: exported type Builder should have comment or be unexported (golint)
    • Line 18: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 30: warning: exported method Builder.IsCompatibleMode should have comment or be unexported (golint)
    • Line 34: warning: exported method Builder.BuildConfig should have comment or be unexported (golint)
    • prometheus-webhook-dingtalk/config/config.go
    • Line 14: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 26: warning: exported function LoadFile should have comment or be unexported (golint)
    • Line 44: warning: exported type Config should have comment or be unexported (golint)
    • Line 53: warning: exported method Config.UnmarshalYAML should have comment or be unexported (golint)
    • Line 84: warning: exported method Config.GetDefaultMessage should have comment or be unexported (golint)
    • Line 91: warning: exported type Target should have comment or be unexported (golint)
    • Line 98: warning: exported method Target.UnmarshalYAML should have comment or be unexported (golint)
    • Line 115: warning: exported type TargetMention should have comment or be unexported (golint)
    • Line 120: warning: exported type TargetMessage should have comment or be unexported (golint)
    • Line 125: warning: exported method TargetMessage.UnmarshalYAML 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!