Preparing report...

Report for github.com/cloudwan/gohan

A+    Excellent!    Found 81 issues across 305 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo94%

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.

    • gohan/server/api.go
    • Line 218: warning: cyclomatic complexity 24 of function MapRouteBySchema() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 18 of function unwrapExtensionException() is high (> 15) (gocyclo)
    • gohan/extension/goplugin/util.go
    • Line 81: warning: cyclomatic complexity 29 of function resourceFromMap() is high (> 15) (gocyclo)
    • Line 265: warning: cyclomatic complexity 16 of function (*Util).ResourceToMap() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 16 of function sliceToMap() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • gohan/db/pagination/pagination.go
    • Line 45: warning: exported type OptionPaginator should have comment or be unexported (golint)
    • Line 65: warning: exported function OptionKey should have comment or be unexported (golint)
    • Line 86: warning: exported function OptionOrder should have comment or be unexported (golint)
    • Line 98: warning: exported function OptionLimit should have comment or be unexported (golint)
    • Line 105: warning: exported function OptionOffset should have comment or be unexported (golint)
    • gohan/healthcheck/healthcheck.go
    • Line 32: warning: exported type HealthCheck should have comment or be unexported (golint)
    • Line 42: warning: exported function NewHealthCheck should have comment or be unexported (golint)
    • Line 62: warning: exported method HealthCheck.Run should have comment or be unexported (golint)
    • gohan/extension/goext/schemas.go
    • Line 61: warning: comment on exported type OptionPaginator should be of the form "OptionPaginator ..." (with optional leading article) (golint)
    • Line 80: warning: exported function OptionKey should have comment or be unexported (golint)
    • Line 86: warning: exported function OptionOrder should have comment or be unexported (golint)
    • Line 92: warning: exported function OptionLimit should have comment or be unexported (golint)
    • Line 98: warning: exported function OptionOffset should have comment or be unexported (golint)
    • Line 154: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gohan/db/sql/sql.go
    • Line 79: warning: exported type TxInterface should have comment or be unexported (golint)
    • Line 1085: warning: exported method Transaction.DeleteFilter should have comment or be unexported (golint)
    • Line 1102: warning: exported method Transaction.StateList should have comment or be unexported (golint)
    • Line 1228: warning: exported type Like should have comment or be unexported (golint)
    • Line 1230: warning: exported method Like.ToSql should have comment or be unexported (golint)
    • gohan/db/search/search.go
    • Line 22: warning: exported type Search should have comment or be unexported (golint)
    • Line 26: warning: exported function NewSearchField should have comment or be unexported (golint)
    • gohan/db/sql/filter.go
    • Line 12: warning: exported const OrCondition should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function AddFilterToSelectQuery should have comment or be unexported (golint)
    • Line 43: warning: exported function AddFilterToDeleteQuery should have comment or be unexported (golint)
    • gohan/sync/etcdv3/etcd.go
    • Line 45: warning: error var KeyNotFound should have name of the form ErrFoo (golint)
    • Line 45: warning: exported var KeyNotFound should have comment or be unexported (golint)
    • Line 488: warning: exported method Sync.Compact should have comment or be unexported (golint)
    • Line 496: warning: exported method Sync.CompareAndSwap should have comment or be unexported (golint)
    • Line 525: warning: exported method Sync.ByValue should have comment or be unexported (golint)
    • Line 525: warning: receiver name sync should be consistent with previous receiver name s for Sync (golint)
    • gohan/server/middleware/middleware.go
    • Line 109: warning: exported function Metrics should have comment or be unexported (golint)
    • Line 297: warning: exported method NobodyIdentityService.GetServiceTokenID should have comment or be unexported (golint)
    • Line 301: warning: exported method NobodyIdentityService.ValidateTenantID should have comment or be unexported (golint)
    • Line 305: warning: exported method NobodyIdentityService.ValidateDomainID should have comment or be unexported (golint)
    • Line 309: warning: exported method NobodyIdentityService.ValidateTenantIDAndDomainIDPair should have comment or be unexported (golint)
    • Line 431: warning: exported function Tracing should have comment or be unexported (golint)
    • gohan/extension/goext/error.go
    • Line 110: warning: comment on exported function NewErrorContinue should be of the form "NewErrorContinue ..." (golint)
    • Line 112: warning: exported function NewErrorSwitchingProtocols should have comment or be unexported (golint)
    • Line 115: warning: exported function NewErrorProcessing should have comment or be unexported (golint)
    • Line 117: warning: comment on exported function NewErrorOK should be of the form "NewErrorOK ..." (golint)
    • Line 119: warning: exported function NewErrorCreated should have comment or be unexported (golint)
    • Line 120: warning: exported function NewErrorAccepted should have comment or be unexported (golint)
    • Line 121: warning: exported function NewErrorNonAuthoritativeInfo should have comment or be unexported (golint)
    • Line 124: warning: exported function NewErrorNoContent should have comment or be unexported (golint)
    • Line 125: warning: exported function NewErrorResetContent should have comment or be unexported (golint)
    • Line 126: warning: exported function NewErrorPartialContent should have comment or be unexported (golint)
    • Line 127: warning: exported function NewErrorMultiStatus should have comment or be unexported (golint)
    • Line 128: warning: exported function NewErrorAlreadyReported should have comment or be unexported (golint)
    • Line 129: warning: exported function NewErrorIMUsed should have comment or be unexported (golint)
    • Line 131: warning: comment on exported function NewErrorMultipleChoices should be of the form "NewErrorMultipleChoices ..." (golint)
    • Line 133: warning: exported function NewErrorMovedPermanently should have comment or be unexported (golint)
    • Line 134: warning: exported function NewErrorFound should have comment or be unexported (golint)
    • Line 135: warning: exported function NewErrorSeeOther should have comment or be unexported (golint)
    • Line 136: warning: exported function NewErrorNotModified should have comment or be unexported (golint)
    • Line 137: warning: exported function NewErrorUseProxy should have comment or be unexported (golint)
    • Line 138: warning: exported function NewErrorTemporaryRedirect should have comment or be unexported (golint)
    • Line 139: warning: exported function NewErrorPermanentRedirect should have comment or be unexported (golint)
    • Line 141: warning: comment on exported function NewErrorBadRequest should be of the form "NewErrorBadRequest ..." (golint)
    • Line 143: warning: exported function NewErrorUnauthorized should have comment or be unexported (golint)
    • Line 144: warning: exported function NewErrorPaymentRequired should have comment or be unexported (golint)
    • Line 145: warning: exported function NewErrorForbidden should have comment or be unexported (golint)
    • Line 146: warning: exported function NewErrorNotFound should have comment or be unexported (golint)
    • Line 147: warning: exported function NewErrorMethodNotAllowed should have comment or be unexported (golint)
    • Line 148: warning: exported function NewErrorNotAcceptable should have comment or be unexported (golint)
    • Line 149: warning: exported function NewErrorProxyAuthRequired should have comment or be unexported (golint)
    • Line 150: warning: exported function NewErrorRequestTimeout should have comment or be unexported (golint)
    • Line 151: warning: exported function NewErrorConflict should have comment or be unexported (golint)
    • Line 152: warning: exported function NewErrorGone should have comment or be unexported (golint)
    • Line 153: warning: exported function NewErrorLengthRequired should have comment or be unexported (golint)
    • Line 154: warning: exported function NewErrorPreconditionFailed should have comment or be unexported (golint)
    • Line 157: warning: exported function NewErrorRequestEntityTooLarge should have comment or be unexported (golint)
    • Line 160: warning: exported function NewErrorRequestURITooLong should have comment or be unexported (golint)
    • Line 161: warning: exported function NewErrorUnsupportedMediaType should have comment or be unexported (golint)
    • Line 164: warning: exported function NewErrorRequestedRangeNotSatisfiable should have comment or be unexported (golint)
    • Line 167: warning: exported function NewErrorExpectationFailed should have comment or be unexported (golint)
    • Line 168: warning: exported function NewErrorTeapot should have comment or be unexported (golint)
    • Line 169: warning: exported function NewErrorUnprocessableEntity should have comment or be unexported (golint)
    • Line 172: warning: exported function NewErrorLocked should have comment or be unexported (golint)
    • Line 173: warning: exported function NewErrorFailedDependency should have comment or be unexported (golint)
    • Line 174: warning: exported function NewErrorUpgradeRequired should have comment or be unexported (golint)
    • Line 175: warning: exported function NewErrorPreconditionRequired should have comment or be unexported (golint)
    • Line 178: warning: exported function NewErrorTooManyRequests should have comment or be unexported (golint)
    • Line 179: warning: exported function NewErrorRequestHeaderFieldsTooLarge should have comment or be unexported (golint)
    • Line 182: warning: exported function NewErrorUnavailableForLegalReasons should have comment or be unexported (golint)
    • Line 186: warning: comment on exported function NewErrorInternalServerError should be of the form "NewErrorInternalServerError ..." (golint)
    • Line 190: warning: exported function NewErrorNotImplemented should have comment or be unexported (golint)
    • Line 191: warning: exported function NewErrorBadGateway should have comment or be unexported (golint)
    • Line 192: warning: exported function NewErrorServiceUnavailable should have comment or be unexported (golint)
    • Line 195: warning: exported function NewErrorGatewayTimeout should have comment or be unexported (golint)
    • Line 196: warning: exported function NewErrorHTTPVersionNotSupported should have comment or be unexported (golint)
    • Line 199: warning: exported function NewErrorVariantAlsoNegotiates should have comment or be unexported (golint)
    • Line 202: warning: exported function NewErrorInsufficientStorage should have comment or be unexported (golint)
    • Line 205: warning: exported function NewErrorLoopDetected should have comment or be unexported (golint)
    • Line 206: warning: exported function NewErrorNotExtended should have comment or be unexported (golint)
    • Line 207: warning: exported function NewErrorNetworkAuthenticationRequired should have comment or be unexported (golint)
    • gohan/extension/framework/framework.go
    • Line 42: warning: comment on exported const FlagConfigFile should be of the form "FlagConfigFile ..." (golint)
    • Line 44: warning: exported const FlagVerbose should have comment (or a comment on this block) or be unexported (golint)
    • gohan/server/middleware/fake.go
    • Line 242: warning: exported method FakeIdentity.GetServiceTokenID should have comment or be unexported (golint)
    • Line 246: warning: exported method FakeIdentity.ValidateTenantID should have comment or be unexported (golint)
    • Line 250: warning: exported method FakeIdentity.ValidateDomainID should have comment or be unexported (golint)
    • Line 254: warning: exported method FakeIdentity.ValidateTenantIDAndDomainIDPair should have comment or be unexported (golint)
    • gohan/schema/property_filter.go
    • Line 5: warning: exported type FilterFactory should have comment or be unexported (golint)
    • Line 9: warning: exported method FilterFactory.CreateFilterFromProperties should have comment or be unexported (golint)
    • Line 21: warning: exported function CreateExcludeAllFilter should have comment or be unexported (golint)
    • Line 43: warning: exported const All should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported type Filter should have comment or be unexported (golint)
    • Line 74: warning: exported method Filter.RemoveHiddenKeysFromMap should have comment or be unexported (golint)
    • Line 84: warning: exported method Filter.RemoveHiddenKeysFromSlice should have comment or be unexported (golint)
    • Line 94: warning: exported method Filter.IsForbidden should have comment or be unexported (golint)
    • Line 98: warning: exported type Predicate should have comment or be unexported (golint)
    • gohan/schema/tenancy.go
    • Line 8: warning: exported type Tenancy should have comment or be unexported (golint)
    • Line 13: warning: exported function NewTenancy should have comment or be unexported (golint)
    • gohan/extension/goplugin/schemas.go
    • Line 59: warning: exported method Schemas.Relations should have comment or be unexported (golint)
    • Line 587: warning: exported method Schema.RawSchema should have comment or be unexported (golint)
    • Line 670: warning: exported method Schema.Metadata should have comment or be unexported (golint)
    • gohan/server/path_watcher.go
    • Line 35: warning: exported type PathWatcher should have comment or be unexported (golint)
    • Line 49: warning: exported function NewPathWatcher should have comment or be unexported (golint)
    • Line 67: warning: exported method PathWatcher.Run should have comment or be unexported (golint)
    • gohan/extension/goplugin/core.go
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 125: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gohan/extension/goplugin/transaction.go
    • Line 108: warning: exported method Transaction.DeleteFilter should have comment or be unexported (golint)
    • Line 115: warning: exported method Transaction.StateList should have comment or be unexported (golint)
    • Line 278: warning: exported method Transaction.Count should have comment or be unexported (golint)
    • gohan/db/initializer/initializer.go
    • Line 11: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 15: warning: exported function NewInitializer should have comment or be unexported (golint)
    • Line 44: warning: exported method Initializer.List should have comment or be unexported (golint)
    • gohan/db/db.go
    • Line 104: warning: exported function WithinTemplate should have comment or be unexported (golint)
    • Line 141: warning: exported function GetRetryInterval should have comment or be unexported (golint)
    • Line 149: warning: exported type FuncInTransaction should have comment or be unexported (golint)
    • Line 166: warning: exported type InitDBParams should have comment or be unexported (golint)
    • Line 170: warning: exported function DefaultTestInitDBParams should have comment or be unexported (golint)
    • gohan/sync/noop/noop.go
    • Line 73: warning: exported method Sync.Compact should have comment or be unexported (golint)
    • Line 73: warning: receiver name s should be consistent with previous receiver name sync for Sync (golint)
    • Line 77: warning: exported method Sync.CompareAndSwap should have comment or be unexported (golint)
    • Line 81: warning: exported method Sync.ByValue should have comment or be unexported (golint)
    • gohan/schema/policy.go
    • Line 56: warning: exported const AdminRole should have comment (or a comment on this block) or be unexported (golint)
    • Line 116: warning: exported type Scope should have comment or be unexported (golint)
    • Line 119: warning: exported const TenantScope should have comment (or a comment on this block) or be unexported (golint)
    • Line 124: warning: exported var AllTokenTypes should have comment or be unexported (golint)
    • Line 143: warning: comment on exported type AttachInfo should be of the form "AttachInfo ..." (with optional leading article) (golint)
    • Line 150: warning: exported type ResourceCondition should have comment or be unexported (golint)
    • Line 181: warning: exported type TenantScopedAuthorization should have comment or be unexported (golint)
    • Line 186: warning: exported type DomainScopedAuthorization should have comment or be unexported (golint)
    • Line 191: warning: comment on exported type AdminAuthorization should be of the form "AdminAuthorization ..." (with optional leading article) (golint)
    • Line 197: warning: exported type AuthorizationBuilder should have comment or be unexported (golint)
    • Line 204: warning: exported function NewAuthorizationBuilder should have comment or be unexported (golint)
    • Line 211: warning: exported method AuthorizationBuilder.WithKeystoneV2Compatibility should have comment or be unexported (golint)
    • Line 216: warning: exported method AuthorizationBuilder.WithTenant should have comment or be unexported (golint)
    • Line 221: warning: exported method AuthorizationBuilder.WithDomain should have comment or be unexported (golint)
    • Line 226: warning: exported method AuthorizationBuilder.WithRoleIDs should have comment or be unexported (golint)
    • Line 235: warning: exported method AuthorizationBuilder.BuildScopedToTenant should have comment or be unexported (golint)
    • Line 254: warning: exported method AuthorizationBuilder.BuildScopedToDomain should have comment or be unexported (golint)
    • Line 261: warning: exported method AuthorizationBuilder.BuildAdmin should have comment or be unexported (golint)
    • Line 275: warning: exported method TenantScopedAuthorization.TenantID should have comment or be unexported (golint)
    • Line 279: warning: exported method TenantScopedAuthorization.TenantName should have comment or be unexported (golint)
    • Line 317: warning: exported method DomainScopedAuthorization.TenantID should have comment or be unexported (golint)
    • Line 321: warning: exported method DomainScopedAuthorization.TenantName should have comment or be unexported (golint)
    • Line 325: warning: exported method DomainScopedAuthorization.DomainID should have comment or be unexported (golint)
    • Line 329: warning: exported method DomainScopedAuthorization.DomainName should have comment or be unexported (golint)
    • Line 333: warning: exported method DomainScopedAuthorization.Roles should have comment or be unexported (golint)
    • Line 337: warning: exported method DomainScopedAuthorization.IsAdmin should have comment or be unexported (golint)
    • Line 367: warning: exported method AdminAuthorization.IsAdmin should have comment or be unexported (golint)
    • Line 431: warning: exported type Tenant should have comment or be unexported (golint)
    • Line 436: warning: exported type Domain should have comment or be unexported (golint)
    • Line 441: warning: exported var DefaultDomain should have comment or be unexported (golint)
    • Line 590: warning: exported method Policy.HasScope should have comment or be unexported (golint)
    • Line 590: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 594: warning: exported method Policy.GetCurrentResourceCondition should have comment or be unexported (golint)
    • Line 594: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 619: warning: exported function NewResourceCondition should have comment or be unexported (golint)
    • Line 717: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 752: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 760: warning: exported method Policy.IsDeny should have comment or be unexported (golint)
    • Line 760: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 769: warning: exported method ResourceCondition.SkipTenantDomainCheck should have comment or be unexported (golint)
    • Line 783: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 789: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 794: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 804: warning: comment on exported method Policy.Check should be of the form "Check ..." (golint)
    • Line 805: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 818: warning: comment on exported method Policy.CheckAccess should be of the form "CheckAccess ..." (golint)
    • Line 819: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 830: warning: comment on exported method Policy.CheckPropertiesFilter should be of the form "CheckPropertiesFilter ..." (golint)
    • Line 831: warning: receiver name p should be consistent with previous receiver name policy for Policy (golint)
    • Line 901: warning: exported method ResourceCondition.GetTenantAndDomainFilters should have comment or be unexported (golint)
    • Line 966: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 972: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 987: warning: comment on exported method ResourceCondition.AddCustomFilters should be of the form "AddCustomFilters ..." (golint)
    • Line 988: warning: receiver name policy should be consistent with previous receiver name p for ResourceCondition (golint)
    • Line 992: warning: exported method ResourceCondition.AddCustomFiltersWithTenancy should have comment or be unexported (golint)
    • Line 992: warning: receiver name policy should be consistent with previous receiver name p for ResourceCondition (golint)
    • Line 996: warning: exported method Policy.GetResourcePathRegexp should have comment or be unexported (golint)
    • Line 1000: warning: exported method Policy.GetPropertyFilter should have comment or be unexported (golint)
    • Line 1004: warning: exported method Policy.GetRelationPropertyName should have comment or be unexported (golint)
    • Line 1008: warning: exported method Policy.GetOtherResourceCondition should have comment or be unexported (golint)
    • Line 1068: warning: exported function GetAttachmentPolicies should have comment or be unexported (golint)
    • gohan/db/transaction/fuzzy_transaction.go
    • Line 63: warning: comment on exported method FuzzyTransaction.DeleteFilter should be of the form "DeleteFilter ..." (golint)
    • Line 98: warning: comment on exported method FuzzyTransaction.StateList should be of the form "StateList ..." (golint)
    • Line 170: warning: exported method FuzzyTransaction.Count should have comment or be unexported (golint)
    • gohan/extension/goext/sync.go
    • Line 51: warning: exported type ErrCompacted should have comment or be unexported (golint)
    • Line 57: warning: exported function NewErrCompacted should have comment or be unexported (golint)
    • gohan/extension/goplugin/environment.go
    • Line 86: warning: comment on exported type IEnvironment should be of the form "IEnvironment ..." (with optional leading article) (golint)
    • Line 180: warning: exported method Environment.Util should have comment or be unexported (golint)
    • gohan/server/resources/resource_management.go
    • Line 108: warning: exported function MeasureRequestTime should have comment or be unexported (golint)
    • Line 201: warning: exported function ValidateAttachmentsForResource should have comment or be unexported (golint)
    • Line 1262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1360: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1428: warning: exported function LoadPolicy should have comment or be unexported (golint)
    • gohan/schema/schema.go
    • Line 280: warning: comment on exported method Schema.IsSubstringSearchEnabled should be of the form "IsSubstringSearchEnabled ..." (golint)
    • gohan/db/transaction/transaction.go
    • Line 47: warning: exported type TxParams should have comment or be unexported (golint)
    • Line 53: warning: exported type Option should have comment or be unexported (golint)
    • Line 55: warning: exported function NewTxParams should have comment or be unexported (golint)
    • Line 68: warning: exported function Context should have comment or be unexported (golint)
    • Line 74: warning: exported function IsolationLevel should have comment or be unexported (golint)
    • Line 80: warning: exported function TraceId should have comment or be unexported (golint)
    • gohan/log/log.go
    • Line 67: warning: exported type Options should have comment or be unexported (golint)
    • Line 72: warning: exported type LoggingOption should have comment or be unexported (golint)
    • Line 74: warning: exported function ModuleName should have comment or be unexported (golint)
    • Line 80: warning: exported function TraceId should have comment or be unexported (golint)
    • gohan/extension/goplugin/util.go
    • Line 31: warning: exported type Util should have comment or be unexported (golint)
    • Line 55: warning: exported method Util.GetTransaction should have comment or be unexported (golint)
    • Line 61: warning: exported function NewController should have comment or be unexported (golint)
    • Line 67: warning: exported function Finish should have comment or be unexported (golint)
    • Line 331: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 383: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 473: warning: exported function GetSchemaID should have comment or be unexported (golint)
    • gohan/extension/goext/filter/filter.go
    • Line 3: warning: exported type FilterElem should have comment or be unexported (golint)
    • Line 5: warning: exported function Predicate should have comment or be unexported (golint)
    • Line 13: warning: exported function Eq should have comment or be unexported (golint)
    • Line 17: warning: exported function Neq should have comment or be unexported (golint)
    • Line 21: warning: exported function And should have comment or be unexported (golint)
    • Line 27: warning: exported function Or should have comment or be unexported (golint)
    • Line 33: warning: exported function True should have comment or be unexported (golint)
    • Line 39: warning: exported function False should have comment or be unexported (golint)
    • Line 45: warning: exported function MaybeEmptyAndFilter should have comment or be unexported (golint)
    • Line 55: warning: exported function MaybeEmptyOrFilter should have comment or be unexported (golint)
    • gohan/extension/goext/test/error.go
    • Line 33: warning: exported method MatchErrorMatcher.Match should have comment or be unexported (golint)
    • Line 41: warning: exported method MatchErrorMatcher.FailureMessage should have comment or be unexported (golint)
    • Line 45: warning: exported method MatchErrorMatcher.NegatedFailureMessage should have comment or be unexported (golint)
    • Line 49: warning: exported function MatchError should have comment or be unexported (golint)
    • gohan/metrics/metrics.go
    • Line 71: warning: exported function UpdateCounter should have comment or be unexported (golint)
    • Line 78: warning: exported function UpdateGauge should have comment or be unexported (golint)
    • gohan/extension/goext/types.go
    • Line 26: warning: exported type MaybeState should have comment or be unexported (golint)
    • Line 29: warning: exported const MaybeUndefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: exported type Maybe should have comment or be unexported (golint)
    • Line 136: warning: exported method MaybeString.Value should have comment or be unexported (golint)
    • Line 140: warning: exported method MaybeFloat.Value should have comment or be unexported (golint)
    • Line 144: warning: exported method MaybeInt.Value should have comment or be unexported (golint)
    • Line 148: warning: exported method MaybeBool.Value should have comment or be unexported (golint)
    • Line 152: warning: exported method MaybeString.UnmarshalJSON should have comment or be unexported (golint)
    • Line 161: warning: exported method MaybeString.MarshalJSON should have comment or be unexported (golint)
    • Line 168: warning: exported method MaybeInt.UnmarshalJSON should have comment or be unexported (golint)
    • Line 177: warning: exported method MaybeInt.MarshalJSON should have comment or be unexported (golint)
    • Line 184: warning: exported method MaybeBool.UnmarshalJSON should have comment or be unexported (golint)
    • Line 193: warning: exported method MaybeBool.MarshalJSON should have comment or be unexported (golint)
    • Line 200: warning: exported method MaybeFloat.UnmarshalJSON should have comment or be unexported (golint)
    • Line 209: warning: exported method MaybeFloat.MarshalJSON should have comment or be unexported (golint)
    • Line 239: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 255: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 350: warning: receiver name m should be consistent with previous receiver name ms for MaybeString (golint)
    • Line 358: warning: receiver name m should be consistent with previous receiver name mb for MaybeBool (golint)
    • Line 366: warning: receiver name m should be consistent with previous receiver name mi for MaybeInt (golint)
    • Line 374: warning: receiver name m should be consistent with previous receiver name mf for MaybeFloat (golint)
    • gohan/cli/migrate.go
    • Line 45: warning: comment on exported const FlagEmitPostMigrationEvent should be of the form "FlagEmitPostMigrationEvent ..." (golint)
    • Line 47: warning: exported const FlagPostMigrationEventTimeout should have comment (or a comment on this block) or be unexported (golint)
    • gohan/sync/sync.go
    • Line 65: warning: comment on exported type CASCondition should be of the form "CASCondition ..." (with optional leading article) (golint)
    • gohan/server/middleware/cached.go
    • Line 11: warning: exported type CachedIdentityService should have comment or be unexported (golint)
    • Line 16: warning: exported method CachedIdentityService.GetTenantName should have comment or be unexported (golint)
    • Line 32: warning: exported method CachedIdentityService.VerifyToken should have comment or be unexported (golint)
    • Line 48: warning: exported method CachedIdentityService.GetServiceAuthorization should have comment or be unexported (golint)
    • Line 61: warning: exported function NewCachedIdentityService should have comment or be unexported (golint)
    • gohan/extension/goplugin/environment_mock.go
    • Line 29: warning: exported type MockIEnvironment should have comment or be unexported (golint)
    • Line 59: warning: exported method MockIEnvironment.GetController should have comment or be unexported (golint)
    • Line 63: warning: exported method MockIEnvironment.SetMockModules should have comment or be unexported (golint)
    • Line 106: warning: exported method MockIEnvironment.Core should have comment or be unexported (golint)
    • Line 110: warning: exported method MockIEnvironment.Logger should have comment or be unexported (golint)
    • Line 114: warning: exported method MockIEnvironment.Schemas should have comment or be unexported (golint)
    • Line 118: warning: exported method MockIEnvironment.Sync should have comment or be unexported (golint)
    • Line 122: warning: exported method MockIEnvironment.Database should have comment or be unexported (golint)
    • Line 126: warning: exported method MockIEnvironment.HTTP should have comment or be unexported (golint)
    • Line 130: warning: exported method MockIEnvironment.Auth should have comment or be unexported (golint)
    • Line 134: warning: exported method MockIEnvironment.Config should have comment or be unexported (golint)
    • Line 138: warning: exported method MockIEnvironment.Util should have comment or be unexported (golint)
    • Line 142: warning: exported method MockIEnvironment.MockCore should have comment or be unexported (golint)
    • Line 146: warning: exported method MockIEnvironment.MockLogger should have comment or be unexported (golint)
    • Line 150: warning: exported method MockIEnvironment.MockSchemas should have comment or be unexported (golint)
    • Line 154: warning: exported method MockIEnvironment.MockSync should have comment or be unexported (golint)
    • Line 158: warning: exported method MockIEnvironment.MockDatabase should have comment or be unexported (golint)
    • Line 162: warning: exported method MockIEnvironment.MockHttp should have comment or be unexported (golint)
    • Line 166: warning: exported method MockIEnvironment.MockAuth should have comment or be unexported (golint)
    • Line 170: warning: exported method MockIEnvironment.MockConfig should have comment or be unexported (golint)
    • Line 174: warning: exported method MockIEnvironment.MockUtil should have comment or be unexported (golint)
    • Line 178: warning: exported method MockIEnvironment.Reset should have comment or be unexported (golint)
    • Line 185: warning: exported method MockIEnvironment.Clone should have comment or be unexported (golint)
    • Line 189: warning: exported method MockIEnvironment.HandleEvent should have comment or be unexported (golint)
    • Line 205: warning: exported method MockIEnvironment.RegisterRawType should have comment or be unexported (golint)
    • Line 209: warning: exported method MockIEnvironment.RegisterType should have comment or be unexported (golint)
    • Line 213: warning: exported method MockIEnvironment.RegisterSchemaEventHandler should have comment or be unexported (golint)
    • Line 237: warning: exported method MockIEnvironment.IsEventHandled should have comment or be unexported (golint)
    • Line 241: warning: exported method MockIEnvironment.LoadExtensionsForPath should have comment or be unexported (golint)
    • Line 245: warning: exported function NewMockIEnvironment should have comment or be unexported (golint)
    • gohan/db/sql/cached_transaction.go
    • Line 34: warning: exported type CachedState should have comment or be unexported (golint)
    • Line 40: warning: exported type CachedTransaction should have comment or be unexported (golint)
    • Line 47: warning: exported function MakeCachedTransaction should have comment or be unexported (golint)
    • Line 53: warning: exported method CachedTransaction.Create should have comment or be unexported (golint)
    • Line 58: warning: exported method CachedTransaction.Update should have comment or be unexported (golint)
    • Line 63: warning: exported method CachedTransaction.StateUpdate should have comment or be unexported (golint)
    • Line 68: warning: exported method CachedTransaction.Delete should have comment or be unexported (golint)
    • Line 73: warning: exported method CachedTransaction.DeleteFilter should have comment or be unexported (golint)
    • Line 78: warning: exported method CachedTransaction.Exec should have comment or be unexported (golint)
    • Line 124: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 141: warning: exported method CachedTransaction.ClearCache should have comment or be unexported (golint)
    • Line 145: warning: exported method CachedTransaction.LockList should have comment or be unexported (golint)
    • Line 168: warning: exported method CachedTransaction.Query should have comment or be unexported (golint)
    • Line 173: warning: exported method CachedTransaction.Fetch should have comment or be unexported (golint)
    • Line 178: warning: exported method CachedTransaction.LockFetch should have comment or be unexported (golint)
    • gohan/extension/goext/const.go
    • Line 18: warning: exported type ResourceEvent should have comment or be unexported (golint)
    • Line 19: warning: exported type CustomEvent should have comment or be unexported (golint)
    • Line 50: warning: exported const KeyTopLevelHandler should have comment (or a comment on this block) or be unexported (golint)
    • gohan/schema/property.go
    • Line 43: warning: exported const ItemPropertyID should have comment or be unexported (golint)
    • Line 45: warning: exported type PropertyBuilder should have comment or be unexported (golint)
    • Line 49: warning: exported function NewPropertyBuilder should have comment or be unexported (golint)
    • Line 60: warning: exported method PropertyBuilder.WithFormat should have comment or be unexported (golint)
    • Line 65: warning: exported method PropertyBuilder.WithProperties should have comment or be unexported (golint)
    • Line 70: warning: exported method PropertyBuilder.WithItems should have comment or be unexported (golint)
    • Line 75: warning: exported method PropertyBuilder.WithEnum should have comment or be unexported (golint)
    • Line 80: warning: exported method PropertyBuilder.WithRelation should have comment or be unexported (golint)
    • Line 87: warning: exported method PropertyBuilder.WithUnique should have comment or be unexported (golint)
    • Line 92: warning: exported method PropertyBuilder.WithNullable should have comment or be unexported (golint)
    • Line 97: warning: exported method PropertyBuilder.WithOnDeleteCascade should have comment or be unexported (golint)
    • Line 102: warning: exported method PropertyBuilder.WithIndexed should have comment or be unexported (golint)
    • Line 107: warning: exported method PropertyBuilder.WithSQLType should have comment or be unexported (golint)
    • Line 112: warning: exported method PropertyBuilder.WithDefaultValue should have comment or be unexported (golint)
    • Line 117: warning: exported method PropertyBuilder.Build should have comment or be unexported (golint)
    • gohan/extension/goplugin/auth.go
    • Line 29: warning: exported method Auth.HasRole should have comment or be unexported (golint)
    • Line 39: warning: exported method Auth.GetTenantName should have comment or be unexported (golint)
    • Line 49: warning: exported method Auth.GetTenantID should have comment or be unexported (golint)
    • Line 59: warning: exported method Auth.GetDomainID should have comment or be unexported (golint)
    • Line 80: warning: exported method Auth.ValidateTenantID should have comment or be unexported (golint)
    • Line 88: warning: exported method Auth.ValidateDomainID should have comment or be unexported (golint)
    • Line 96: warning: exported method Auth.ValidateTenantIDAndDomainIDPair should have comment or be unexported (golint)
    • gohan/util/consts.go
    • Line 19: warning: exported const DefaultHealthCheckPortOffset should have comment (or a comment on this block) or be unexported (golint)
    • gohan/server/db_sync_wrapper.go
    • Line 30: warning: exported function NewDbSyncWrapper should have comment or be unexported (golint)
    • Line 43: warning: exported method DbSyncWrapper.Connect should have comment or be unexported (golint)
    • Line 47: warning: exported method DbSyncWrapper.Close should have comment or be unexported (golint)
    • Line 51: warning: exported method DbSyncWrapper.RegisterTable should have comment or be unexported (golint)
    • Line 55: warning: exported method DbSyncWrapper.DropTable should have comment or be unexported (golint)
    • Line 59: warning: exported method DbSyncWrapper.Options should have comment or be unexported (golint)
    • gohan/server/transaction_commit_informer.go
    • Line 33: warning: exported const SyncKeyTxCommitted should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported function NewTransactionCommitInformer should have comment or be unexported (golint)
    • Line 49: warning: exported type TransactionCommitInformer should have comment or be unexported (golint)
    • Line 54: warning: exported method TransactionCommitInformer.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words