Preparing report...

Report for github.com/timothyye/godns

A    Great!    Found 8 issues across 24 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!


gocyclo91%

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.

    • godns/utils.go
    • Line 185: warning: cyclomatic complexity 22 of function CheckSettings() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 18 of function GetIPFromInterface() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • godns/notify/manager.go
    • Line 12: warning: exported const Email should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type INotify should have comment or be unexported (golint)
    • Line 31: warning: exported function GetNotifyManager should have comment or be unexported (golint)
    • godns/notify/slack.go
    • Line 14: warning: exported type SlackNotify should have comment or be unexported (golint)
    • Line 18: warning: exported function NewSlackNotify should have comment or be unexported (golint)
    • Line 22: warning: exported method SlackNotify.Send should have comment or be unexported (golint)
    • godns/notify/telegram.go
    • Line 13: warning: exported type TelegramNotify should have comment or be unexported (golint)
    • Line 17: warning: exported function NewTelegramNotify should have comment or be unexported (golint)
    • Line 21: warning: exported method TelegramNotify.Send should have comment or be unexported (golint)
    • godns/settings.go
    • Line 15: warning: comment on exported type SlackNotify should be of the form "SlackNotify ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type TelegramNotify should be of the form "TelegramNotify ..." (with optional leading article) (golint)
    • Line 33: warning: comment on exported type MailNotify should be of the form "MailNotify ..." (with optional leading article) (golint)
    • Line 43: warning: exported type DiscordNotify should have comment or be unexported (golint)
    • godns/utils.go
    • Line 60: warning: comment on exported const IPTypeA should be of the form "IPTypeA ..." (golint)
    • Line 62: warning: comment on exported const IPTypeAAAA should be of the form "IPTypeAAAA ..." (golint)
    • Line 64: warning: comment on exported const RootDomain should be of the form "RootDomain ..." (golint)
    • godns/notify/discord.go
    • Line 10: warning: exported type DiscordNotify should have comment or be unexported (golint)
    • Line 14: warning: exported function NewDiscordNotify should have comment or be unexported (golint)
    • Line 18: warning: exported method DiscordNotify.Send should have comment or be unexported (golint)
    • godns/notify/email.go
    • Line 10: warning: exported type EmailNotify should have comment or be unexported (golint)
    • Line 14: warning: exported function NewEmailNotify should have comment or be unexported (golint)
    • Line 18: warning: exported method EmailNotify.Send should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 2)


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!