Preparing report...

Report for github.com/dewep-online/fdns

A+    Excellent!    Found 15 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!


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!


golint37%

Golint is a linter for Go source code.

    • fdns/pkg/blacklist/repository.go
    • Line 10: warning: exported type Repository should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 22: warning: exported method Repository.Up should have comment or be unexported (golint)
    • Line 33: warning: exported method Repository.Down should have comment or be unexported (golint)
    • Line 37: warning: exported method Repository.Has should have comment or be unexported (golint)
    • Line 51: warning: exported method Repository.BlackHole should have comment or be unexported (golint)
    • fdns/pkg/utils/utils.go
    • Line 13: warning: exported var ErrInvalidIP should have comment or be unexported (golint)
    • Line 19: warning: exported function ValidateDNS should have comment or be unexported (golint)
    • Line 29: warning: exported function ValidateDNSs should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseIPs should have comment or be unexported (golint)
    • Line 63: warning: exported function ReTry should have comment or be unexported (golint)
    • fdns/internal/dnsserver/server.go
    • Line 15: warning: exported type Server should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported method Server.Up should have comment or be unexported (golint)
    • Line 68: warning: exported method Server.Down should have comment or be unexported (golint)
    • fdns/pkg/rules/repository.go
    • Line 16: warning: exported type Repository should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: exported method Repository.Up should have comment or be unexported (golint)
    • Line 92: warning: exported method Repository.Down should have comment or be unexported (golint)
    • Line 96: warning: exported method Repository.DNS should have comment or be unexported (golint)
    • Line 125: warning: exported method Repository.GetA should have comment or be unexported (golint)
    • Line 138: warning: exported method Repository.GetAAAA should have comment or be unexported (golint)
    • fdns/pkg/cache/ruleip.go
    • Line 8: warning: exported type Item should have comment or be unexported (golint)
    • Line 17: warning: exported function Create should have comment or be unexported (golint)
    • Line 25: warning: exported method Item.IsUpdatable should have comment or be unexported (golint)
    • Line 31: warning: exported method Item.SetUpdatable should have comment or be unexported (golint)
    • Line 37: warning: exported method Item.SetIP4 should have comment or be unexported (golint)
    • Line 48: warning: exported method Item.GetIP4 should have comment or be unexported (golint)
    • Line 57: warning: exported method Item.HasIP4 should have comment or be unexported (golint)
    • Line 63: warning: exported method Item.GetIP6 should have comment or be unexported (golint)
    • Line 72: warning: exported method Item.SetIP6 should have comment or be unexported (golint)
    • Line 83: warning: exported method Item.HasIP6 should have comment or be unexported (golint)
    • fdns/pkg/rules/rule.go
    • Line 10: warning: exported type RuleMap should have comment or be unexported (golint)
    • Line 11: warning: exported type Rule should have comment or be unexported (golint)
    • Line 19: warning: exported method Rule.Compile should have comment or be unexported (golint)
    • Line 31: warning: exported method Rule.Match should have comment or be unexported (golint)
    • fdns/internal/api/controller.go
    • Line 21: warning: comment on exported type CacheList should be of the form "CacheList ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type CacheListItem should be of the form "CacheListItem ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported method API.CacheList should be of the form "CacheList ..." (golint)
    • fdns/pkg/dnscli/client.go
    • Line 13: warning: exported type Client should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method Client.ExchangeRandomDNS should have comment or be unexported (golint)
    • Line 36: warning: exported method Client.Exchange should have comment or be unexported (golint)
    • Line 67: warning: exported method Client.Up should have comment or be unexported (golint)
    • Line 87: warning: exported method Client.Down should have comment or be unexported (golint)
    • fdns/pkg/utils/dns.go
    • Line 10: warning: exported const TTL should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported function CreateA should have comment or be unexported (golint)
    • Line 28: warning: exported function CreateAAAA should have comment or be unexported (golint)
    • fdns/pkg/cache/repository.go
    • Line 11: warning: exported type Cache should have comment or be unexported (golint)
    • Line 12: warning: exported type Repository should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 24: warning: exported method Repository.Get should have comment or be unexported (golint)
    • Line 33: warning: exported method Repository.Set should have comment or be unexported (golint)
    • Line 39: warning: exported method Repository.Del should have comment or be unexported (golint)
    • Line 45: warning: exported method Repository.Update should have comment or be unexported (golint)
    • Line 59: warning: exported method Repository.List 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!