Preparing report...

Report for github.com/rancher/rdns-server

A+    Excellent!    Found 25 issues across 36 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!


gocyclo86%

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.

    • rdns-server/backend/route53/route53.go
    • Line 1017: warning: cyclomatic complexity 20 of function (*Backend).filterRecords() is high (> 15) (gocyclo)
    • Line 244: warning: cyclomatic complexity 19 of function (*Backend).Update() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 17 of function (*Backend).Set() is high (> 15) (gocyclo)
    • Line 830: warning: cyclomatic complexity 16 of function (*Backend).setRecordToDatabase() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • rdns-server/backend/etcdv3/etcdv3.go
    • Line 22: warning: exported const Name should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported type Backend should have comment or be unexported (golint)
    • Line 44: warning: exported function NewBackend should have comment or be unexported (golint)
    • Line 71: warning: exported method Backend.GetName should have comment or be unexported (golint)
    • Line 75: warning: exported method Backend.GetZone should have comment or be unexported (golint)
    • Line 79: warning: exported method Backend.Get should have comment or be unexported (golint)
    • Line 156: warning: exported method Backend.Set should have comment or be unexported (golint)
    • Line 189: warning: exported method Backend.Update should have comment or be unexported (golint)
    • Line 215: warning: exported method Backend.Delete should have comment or be unexported (golint)
    • Line 265: warning: exported method Backend.Renew should have comment or be unexported (golint)
    • Line 343: warning: exported method Backend.SetCNAME should have comment or be unexported (golint)
    • Line 347: warning: exported method Backend.GetCNAME should have comment or be unexported (golint)
    • Line 351: warning: exported method Backend.UpdateCNAME should have comment or be unexported (golint)
    • Line 355: warning: exported method Backend.DeleteCNAME should have comment or be unexported (golint)
    • Line 359: warning: exported method Backend.SetText should have comment or be unexported (golint)
    • Line 385: warning: exported method Backend.GetText should have comment or be unexported (golint)
    • Line 426: warning: exported method Backend.UpdateText should have comment or be unexported (golint)
    • Line 456: warning: exported method Backend.DeleteText should have comment or be unexported (golint)
    • Line 471: warning: exported method Backend.GetToken should have comment or be unexported (golint)
    • Line 495: warning: exported method Backend.GetTokenCount should have comment or be unexported (golint)
    • Line 513: warning: exported method Backend.MigrateFrozen should have comment or be unexported (golint)
    • Line 531: warning: exported method Backend.MigrateToken should have comment or be unexported (golint)
    • Line 549: warning: exported method Backend.MigrateRecord should have comment or be unexported (golint)
    • rdns-server/model/domain.go
    • Line 10: warning: exported type Domain should have comment or be unexported (golint)
    • Line 32: warning: exported type DomainOptions should have comment or be unexported (golint)
    • Line 54: warning: exported function ParseDomainOptions should have comment or be unexported (golint)
    • rdns-server/database/database.go
    • Line 13: warning: exported type Database should have comment or be unexported (golint)
    • Line 48: warning: exported function SetDatabase should have comment or be unexported (golint)
    • Line 52: warning: exported function GetDatabase should have comment or be unexported (golint)
    • rdns-server/util/random.go
    • Line 19: warning: exported function RandStringWithSmall should have comment or be unexported (golint)
    • Line 23: warning: exported function RandStringWithAll should have comment or be unexported (golint)
    • rdns-server/backend/route53/route53.go
    • Line 24: warning: exported const Name should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported type Backend should have comment or be unexported (golint)
    • Line 42: warning: exported function NewBackend should have comment or be unexported (golint)
    • Line 81: warning: exported method Backend.GetName should have comment or be unexported (golint)
    • Line 85: warning: exported method Backend.GetZone should have comment or be unexported (golint)
    • Line 89: warning: exported method Backend.Get should have comment or be unexported (golint)
    • Line 144: warning: exported method Backend.Set should have comment or be unexported (golint)
    • Line 244: warning: exported method Backend.Update should have comment or be unexported (golint)
    • Line 361: warning: exported method Backend.Delete should have comment or be unexported (golint)
    • Line 396: warning: exported method Backend.Renew should have comment or be unexported (golint)
    • Line 420: warning: exported method Backend.SetCNAME should have comment or be unexported (golint)
    • Line 487: warning: exported method Backend.GetCNAME should have comment or be unexported (golint)
    • Line 513: warning: exported method Backend.UpdateCNAME should have comment or be unexported (golint)
    • Line 564: warning: exported method Backend.DeleteCNAME should have comment or be unexported (golint)
    • Line 586: warning: exported method Backend.GetText should have comment or be unexported (golint)
    • Line 612: warning: exported method Backend.SetText should have comment or be unexported (golint)
    • Line 647: warning: exported method Backend.UpdateText should have comment or be unexported (golint)
    • Line 693: warning: exported method Backend.DeleteText should have comment or be unexported (golint)
    • Line 715: warning: exported method Backend.GetToken should have comment or be unexported (golint)
    • Line 720: warning: exported method Backend.GetTokenCount should have comment or be unexported (golint)
    • Line 724: warning: exported method Backend.SetToken should have comment or be unexported (golint)
    • Line 736: warning: exported method Backend.MigrateFrozen should have comment or be unexported (golint)
    • Line 740: warning: exported method Backend.MigrateToken should have comment or be unexported (golint)
    • Line 744: warning: exported method Backend.MigrateRecord should have comment or be unexported (golint)
    • rdns-server/service/routes.go
    • Line 11: warning: exported type Route should have comment or be unexported (golint)
    • Line 18: warning: exported type Routes should have comment or be unexported (golint)
    • Line 125: warning: exported function NewRouter should have comment or be unexported (golint)
    • rdns-server/client/rdns_client.go
    • Line 39: warning: exported type SecretLister should have comment or be unexported (golint)
    • Line 43: warning: exported type SecretCreator should have comment or be unexported (golint)
    • Line 48: warning: exported type Client should have comment or be unexported (golint)
    • Line 95: warning: exported method Client.ApplyDomain should have comment or be unexported (golint)
    • Line 122: warning: exported method Client.GetDomain should have comment or be unexported (golint)
    • Line 155: warning: exported method Client.CreateDomain should have comment or be unexported (golint)
    • Line 189: warning: exported method Client.UpdateDomain should have comment or be unexported (golint)
    • Line 230: warning: exported method Client.DeleteDomain should have comment or be unexported (golint)
    • Line 255: warning: exported method Client.RenewDomain should have comment or be unexported (golint)
    • Line 280: warning: exported method Client.SetBaseURL should have comment or be unexported (golint)
    • Line 325: warning: exported function NewClient should have comment or be unexported (golint)
    • rdns-server/coredns/coredns.go
    • Line 23: warning: exported const CoreVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported function StartCoreDNSDaemon should have comment or be unexported (golint)
    • rdns-server/model/migrate.go
    • Line 9: warning: exported type MigrateRecord should have comment or be unexported (golint)
    • Line 18: warning: exported type MigrateFrozen should have comment or be unexported (golint)
    • Line 23: warning: exported type MigrateToken should have comment or be unexported (golint)
    • Line 29: warning: exported function ParseMigrateRecord should have comment or be unexported (golint)
    • Line 36: warning: exported function ParseMigrateFrozen should have comment or be unexported (golint)
    • Line 43: warning: exported function ParseMigrateToken should have comment or be unexported (golint)
    • rdns-server/model/database.go
    • Line 5: warning: exported type Token should have comment or be unexported (golint)
    • Line 12: warning: exported type FrozenPrefix should have comment or be unexported (golint)
    • Line 18: warning: exported type RecordA should have comment or be unexported (golint)
    • Line 28: warning: exported type SubRecordA should have comment or be unexported (golint)
    • Line 38: warning: exported type RecordTXT should have comment or be unexported (golint)
    • Line 48: warning: exported type RecordCNAME should have comment or be unexported (golint)
    • rdns-server/backend/backend.go
    • Line 11: warning: exported type Backend should have comment or be unexported (golint)
    • Line 34: warning: exported function SetBackend should have comment or be unexported (golint)
    • Line 38: warning: exported function GetBackend should have comment or be unexported (golint)
    • rdns-server/database/mysql/mysql.go
    • Line 14: warning: exported const DriverName should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Database should have comment or be unexported (golint)
    • Line 24: warning: exported function NewDatabase should have comment or be unexported (golint)
    • Line 40: warning: exported method Database.InsertFrozen should have comment or be unexported (golint)
    • Line 51: warning: exported method Database.QueryFrozen should have comment or be unexported (golint)
    • Line 66: warning: exported method Database.RenewFrozen should have comment or be unexported (golint)
    • Line 77: warning: exported method Database.DeleteFrozen should have comment or be unexported (golint)
    • Line 88: warning: exported method Database.DeleteExpiredFrozen should have comment or be unexported (golint)
    • Line 99: warning: exported method Database.MigrateFrozen should have comment or be unexported (golint)
    • Line 110: warning: exported method Database.InsertToken should have comment or be unexported (golint)
    • Line 125: warning: exported method Database.QueryTokenCount should have comment or be unexported (golint)
    • Line 140: warning: exported method Database.QueryToken should have comment or be unexported (golint)
    • Line 155: warning: exported method Database.QueryExpiredTokens should have comment or be unexported (golint)
    • Line 179: warning: exported method Database.RenewToken should have comment or be unexported (golint)
    • Line 200: warning: exported method Database.DeleteToken should have comment or be unexported (golint)
    • Line 211: warning: exported method Database.MigrateToken should have comment or be unexported (golint)
    • Line 226: warning: exported method Database.InsertA should have comment or be unexported (golint)
    • Line 240: warning: exported method Database.QueryA should have comment or be unexported (golint)
    • Line 262: warning: exported method Database.UpdateA should have comment or be unexported (golint)
    • Line 276: warning: exported method Database.DeleteA should have comment or be unexported (golint)
    • Line 287: warning: exported method Database.InsertSubA should have comment or be unexported (golint)
    • Line 301: warning: exported method Database.UpdateSubA should have comment or be unexported (golint)
    • Line 315: warning: exported method Database.QuerySubA should have comment or be unexported (golint)
    • Line 337: warning: exported method Database.ListSubA should have comment or be unexported (golint)
    • Line 362: warning: exported method Database.DeleteSubA should have comment or be unexported (golint)
    • Line 373: warning: exported method Database.InsertCNAME should have comment or be unexported (golint)
    • Line 387: warning: exported method Database.UpdateCNAME should have comment or be unexported (golint)
    • Line 401: warning: exported method Database.QueryCNAME should have comment or be unexported (golint)
    • Line 423: warning: exported method Database.DeleteCNAME should have comment or be unexported (golint)
    • Line 434: warning: exported method Database.InsertTXT should have comment or be unexported (golint)
    • Line 448: warning: exported method Database.UpdateTXT should have comment or be unexported (golint)
    • Line 462: warning: exported method Database.DeleteTXT should have comment or be unexported (golint)
    • Line 473: warning: exported method Database.QueryTXT should have comment or be unexported (golint)
    • Line 495: warning: exported method Database.QueryExpiredTXTs should have comment or be unexported (golint)
    • Line 519: warning: exported method Database.Close should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell94%

Misspell Finds commonly misspelled English words