Preparing report...

Report for github.com/solution9th/NSBridge

A    Great!    Found 38 issues across 66 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!


gocyclo93%

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.


golint46%

Golint is a linter for Go source code.

    • NSBridge/internal/nserr/errors.go
    • Line 50: warning: comment on exported const WebErrDelAuthNotDisable should be of the form "WebErrDelAuthNotDisable ..." (golint)
    • Line 79: warning: comment on exported const ErrRecordTypeSupport should be of the form "ErrRecordTypeSupport ..." (golint)
    • NSBridge/internal/oidc/jose.go
    • Line 8: warning: comment on exported const RS256 should be of the form "RS256 ..." (golint)
    • Line 12: warning: exported const RS384 should have comment (or a comment on this block) or be unexported (golint)
    • NSBridge/test/main.go
    • Line 70: warning: context.Context should be the first parameter of a function (golint)
    • Line 83: warning: context.Context should be the first parameter of a function (golint)
    • Line 96: warning: context.Context should be the first parameter of a function (golint)
    • Line 107: warning: context.Context should be the first parameter of a function (golint)
    • Line 118: warning: context.Context should be the first parameter of a function (golint)
    • Line 131: warning: context.Context should be the first parameter of a function (golint)
    • Line 143: warning: context.Context should be the first parameter of a function (golint)
    • Line 153: warning: context.Context should be the first parameter of a function (golint)
    • Line 165: warning: context.Context should be the first parameter of a function (golint)
    • Line 178: warning: context.Context should be the first parameter of a function (golint)
    • Line 196: warning: context.Context should be the first parameter of a function (golint)
    • Line 211: warning: context.Context should be the first parameter of a function (golint)
    • Line 224: warning: context.Context should be the first parameter of a function (golint)
    • Line 242: warning: exported function GenJson should have comment or be unexported (golint)
    • NSBridge/internal/oneapm/apm.go
    • Line 17: warning: exported var OneAPP should have comment or be unexported (golint)
    • Line 20: warning: exported function AppTransmission should have comment or be unexported (golint)
    • Line 37: warning: exported function NewInterceptor should have comment or be unexported (golint)
    • Line 43: warning: exported type Interceptor should have comment or be unexported (golint)
    • Line 47: warning: exported method Interceptor.UnaryServerInterceptor should have comment or be unexported (golint)
    • NSBridge/internal/utils/tools.go
    • Line 46: warning: exported function GenJson should have comment or be unexported (golint)
    • Line 55: warning: exported function GenAuthKey should have comment or be unexported (golint)
    • Line 59: warning: exported function GenAuthSecret should have comment or be unexported (golint)
    • NSBridge/api/web/api.go
    • Line 20: warning: exported const AppUrl should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported type User should be of the form "User ..." (with optional leading article) (golint)
    • Line 50: warning: exported type AuthToken should have comment or be unexported (golint)
    • Line 69: warning: exported function OIDCLogin should have comment or be unexported (golint)
    • Line 71: warning: don't use underscores in Go names; var id_token should be idToken (golint)
    • Line 89: warning: exported function OIDCAuth should have comment or be unexported (golint)
    • Line 109: warning: exported function CallBack should have comment or be unexported (golint)
    • NSBridge/api/web/construct.go
    • Line 14: warning: exported type DnsApp should have comment or be unexported (golint)
    • Line 23: warning: exported function InitInstance should have comment or be unexported (golint)
    • Line 29: warning: don't use underscores in Go names; var dns_app should be dnsApp (golint)
    • NSBridge/internal/service/cache/cache.go
    • Line 19: warning: exported type Cache should have comment or be unexported (golint)
    • Line 23: warning: exported method Cache.Set should have comment or be unexported (golint)
    • Line 32: warning: exported method Cache.Get should have comment or be unexported (golint)
    • Line 42: warning: exported method Cache.Delete should have comment or be unexported (golint)
    • Line 51: warning: exported method Cache.Exist should have comment or be unexported (golint)
    • Line 63: warning: exported method Cache.Incr should have comment or be unexported (golint)
    • Line 71: warning: comment on exported method Cache.SetNX should be of the form "SetNX ..." (golint)
    • Line 76: warning: exported method Cache.SetNoGob should have comment or be unexported (golint)
    • Line 80: warning: exported method Cache.GetNoGob should have comment or be unexported (golint)
    • Line 90: warning: exported function GobEnValue should have comment or be unexported (golint)
    • Line 100: warning: exported function GobDeValue should have comment or be unexported (golint)
    • NSBridge/internal/config/model.go
    • Line 3: warning: exported type ConfigServer should have comment or be unexported (golint)
    • Line 9: warning: exported type ConfigGRpc should have comment or be unexported (golint)
    • Line 13: warning: exported type ConfigRedis should have comment or be unexported (golint)
    • Line 20: warning: exported type ConfigMySQL should have comment or be unexported (golint)
    • Line 28: warning: exported type ConfigFOne should have comment or be unexported (golint)
    • Line 35: warning: exported type ConfigNameServer should have comment or be unexported (golint)
    • Line 37: warning: exported type ConfigSaml should have comment or be unexported (golint)
    • NSBridge/internal/service/database/table_auth.go
    • Line 16: warning: error var WebErrDelAuthNotDisable should have name of the form ErrFoo (golint)
    • Line 16: warning: exported var WebErrDelAuthNotDisable should have comment or be unexported (golint)
    • Line 19: warning: exported type MAuth should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method Tables.SearchAllAuth should be of the form "SearchAllAuth ..." (golint)
    • NSBridge/internal/sdk/fone/f1.go
    • Line 18: warning: exported var ErrDomainParams should have comment or be unexported (golint)
    • Line 27: warning: exported const FONETokenKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type Result should have comment or be unexported (golint)
    • Line 37: warning: exported type FOneDNS should have comment or be unexported (golint)
    • NSBridge/internal/dns/dns_record.go
    • Line 69: warning: exported type RecordInfo should have comment or be unexported (golint)
    • Line 81: warning: comment on exported method DNS.CheckRecord should be of the form "CheckRecord ..." (golint)
    • Line 145: warning: comment on exported method DNS.CreateRecord should be of the form "CreateRecord ..." (golint)
    • Line 250: warning: exported method DNS.GetRecordByDomainId should have comment or be unexported (golint)
    • Line 269: warning: comment on exported method DNS.UpdateRecord should be of the form "UpdateRecord ..." (golint)
    • Line 366: warning: comment on exported method DNS.DisableRecord should be of the form "DisableRecord ..." (golint)
    • Line 434: warning: comment on exported method DNS.DeleteRecord should be of the form "DeleteRecord ..." (golint)
    • NSBridge/internal/service/database/table_record.go
    • Line 19: warning: exported type MDNSRecord should have comment or be unexported (golint)
    • Line 37: warning: exported type RecordTypes should have comment or be unexported (golint)
    • Line 64: warning: comment on exported method Tables.GetAllRecordByDomainID should be of the form "GetAllRecordByDomainID ..." (golint)
    • NSBridge/internal/dns/dns_domain.go
    • Line 19: warning: exported var ErrDomainHasExist should have comment or be unexported (golint)
    • Line 23: warning: exported type DNS should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • NSBridge/internal/utils/errors.go
    • Line 6: warning: exported const ErrSuccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported var ErrCode should have comment or be unexported (golint)
    • Line 22: warning: exported type Response should have comment or be unexported (golint)
    • NSBridge/internal/utils/lines.go
    • Line 24: warning: exported var LineMap should have comment or be unexported (golint)
    • Line 26: warning: exported type Line should have comment or be unexported (golint)
    • Line 31: warning: exported function GetLineMap should have comment or be unexported (golint)
    • NSBridge/internal/service/database/table_domain.go
    • Line 13: warning: exported type MDNSDomain should have comment or be unexported (golint)
    • Line 30: warning: exported type NS should have comment or be unexported (golint)
    • Line 32: warning: exported method NS.UnmarshalByte should have comment or be unexported (golint)
    • Line 199: warning: comment on exported method Tables.SearchDomainsByDomain should be of the form "SearchDomainsByDomain ..." (golint)
    • Line 225: warning: comment on exported method Tables.CountOwnDomainNum should be of the form "CountOwnDomainNum ..." (golint)
    • NSBridge/api/web/saml.go
    • Line 22: warning: exported const UserSessionKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 77: warning: exported function SAMLAuth should have comment or be unexported (golint)
    • Line 140: warning: exported function SAMLAcs should have comment or be unexported (golint)
    • Line 207: warning: exported function GetI1Notice should have comment or be unexported (golint)
    • NSBridge/api/grpc/middleware.go
    • Line 25: warning: exported const APIHMACName should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: error var InvalidError should have name of the form ErrFoo (golint)
    • Line 30: warning: exported var InvalidError should have comment or be unexported (golint)
    • Line 129: warning: exported const DisableDomainKey should have comment (or a comment on this block) or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words