Preparing report...

Report for github.com/getgort/gort

A+    Excellent!    Found 31 issues across 135 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!


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.

    • gort/adapter/adapter.go
    • Line 525: warning: cyclomatic complexity 23 of function adapterLogEntry() is high (> 15) (gocyclo)
    • Line 312: warning: cyclomatic complexity 22 of function TriggerCommand() is high (> 15) (gocyclo)
    • Line 612: warning: cyclomatic complexity 20 of function addSpanAttributes() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • gort/adapter/adapter.go
    • Line 46: warning: exported const CommandsRequireAtLeastOneRule should have comment (or a comment on this block) or be unexported (golint)
    • Line 124: warning: exported type RequestorIdentity should have comment or be unexported (golint)
    • gort/data/rest/role-data.go
    • Line 19: warning: exported type Role should have comment or be unexported (golint)
    • Line 24: warning: exported type RolePermission should have comment or be unexported (golint)
    • gort/dataaccess/memory/group-access.go
    • Line 166: warning: exported method InMemoryDataAccess.GroupListRoles should have comment or be unexported (golint)
    • Line 181: warning: exported method InMemoryDataAccess.GroupListUsers should have comment or be unexported (golint)
    • gort/dataaccess/memory/role-access.go
    • Line 40: warning: comment on exported method InMemoryDataAccess.RoleDelete should be of the form "RoleDelete ..." (golint)
    • Line 78: warning: exported method InMemoryDataAccess.RoleGrantPermission should have comment or be unexported (golint)
    • Line 89: warning: exported method InMemoryDataAccess.RoleRevokePermission should have comment or be unexported (golint)
    • gort/rules/operator.go
    • Line 23: warning: exported type Operator should have comment or be unexported (golint)
    • Line 25: warning: exported function Equals should have comment or be unexported (golint)
    • Line 29: warning: exported function NotEquals should have comment or be unexported (golint)
    • Line 33: warning: exported function LessThan should have comment or be unexported (golint)
    • Line 37: warning: exported function LessThanOrEqualTo should have comment or be unexported (golint)
    • Line 41: warning: exported function GreaterThan should have comment or be unexported (golint)
    • Line 45: warning: exported function GreaterThanOrEqualTo should have comment or be unexported (golint)
    • Line 49: warning: exported function In should have comment or be unexported (golint)
    • gort/telemetry/tracing.go
    • Line 31: warning: exported function CreateAndRegisterExporters should have comment or be unexported (golint)
    • Line 70: 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)
    • gort/config/config.go
    • Line 37: warning: exported const EnvDatabasePassword should have comment (or a comment on this block) or be unexported (golint)
    • gort/types/value.go
    • Line 25: warning: exported type Value should have comment or be unexported (golint)
    • Line 31: warning: exported type CollectionValue should have comment or be unexported (golint)
    • Line 41: warning: exported method BoolValue.Equals should have comment or be unexported (golint)
    • Line 67: warning: exported method BoolValue.LessThan should have comment or be unexported (golint)
    • Line 71: warning: exported method BoolValue.Value should have comment or be unexported (golint)
    • Line 80: warning: exported method FloatValue.Equals should have comment or be unexported (golint)
    • Line 94: warning: exported method FloatValue.LessThan should have comment or be unexported (golint)
    • Line 106: warning: exported method FloatValue.Value should have comment or be unexported (golint)
    • Line 115: warning: exported method IntValue.Equals should have comment or be unexported (golint)
    • Line 130: warning: exported method IntValue.LessThan should have comment or be unexported (golint)
    • Line 142: warning: exported method IntValue.Value should have comment or be unexported (golint)
    • Line 146: warning: comment on exported type NullValue should be of the form "NullValue ..." (with optional leading article) (golint)
    • Line 149: warning: exported method NullValue.Equals should have comment or be unexported (golint)
    • Line 158: warning: exported method NullValue.LessThan should have comment or be unexported (golint)
    • Line 162: warning: exported method NullValue.Value should have comment or be unexported (golint)
    • Line 171: warning: exported method RegexValue.Pattern should have comment or be unexported (golint)
    • Line 175: warning: exported method RegexValue.Equals should have comment or be unexported (golint)
    • Line 189: warning: exported method RegexValue.LessThan should have comment or be unexported (golint)
    • Line 193: warning: exported method RegexValue.Value should have comment or be unexported (golint)
    • Line 203: warning: exported method StringValue.Equals should have comment or be unexported (golint)
    • Line 216: warning: exported method StringValue.LessThan should have comment or be unexported (golint)
    • Line 220: warning: exported method StringValue.Value should have comment or be unexported (golint)
    • Line 224: warning: comment on exported type MapValue should be of the form "MapValue ..." (with optional leading article) (golint)
    • Line 231: warning: exported method MapValue.Contains should have comment or be unexported (golint)
    • Line 241: warning: exported method MapValue.Equals should have comment or be unexported (golint)
    • Line 255: warning: exported method MapValue.LessThan should have comment or be unexported (golint)
    • Line 264: warning: exported method MapValue.Value should have comment or be unexported (golint)
    • Line 268: warning: comment on exported type ListValue should be of the form "ListValue ..." (with optional leading article) (golint)
    • Line 275: warning: exported method ListValue.Contains should have comment or be unexported (golint)
    • Line 285: warning: exported method ListValue.Equals should have comment or be unexported (golint)
    • Line 293: warning: exported method ListValue.LessThan should have comment or be unexported (golint)
    • Line 297: warning: exported method ListValue.Value should have comment or be unexported (golint)
    • Line 308: warning: exported method UnknownValue.Equals should have comment or be unexported (golint)
    • Line 312: warning: exported method UnknownValue.LessThan should have comment or be unexported (golint)
    • Line 316: warning: exported method UnknownValue.Value should have comment or be unexported (golint)
    • gort/rules/parse.go
    • Line 26: warning: exported function Parse should have comment or be unexported (golint)
    • Line 71: warning: exported function ParseExpression should have comment or be unexported (golint)
    • gort/telemetry/counter.go
    • Line 40: warning: exported type MetricCounter should have comment or be unexported (golint)
    • Line 46: warning: exported method MetricCounter.Commit should have comment or be unexported (golint)
    • Line 50: warning: exported method MetricCounter.WithAttribute should have comment or be unexported (golint)
    • Line 77: warning: exported method MetricCounter.WithEntryFields should have comment or be unexported (golint)
    • Line 85: warning: exported method MetricCounter.WithError should have comment or be unexported (golint)
    • Line 89: warning: exported method MetricCounter.WithValue should have comment or be unexported (golint)
    • gort/telemetry/metrics.go
    • Line 34: warning: comment on exported function UnauthorizedRequests should be of the form "UnauthorizedRequests ..." (golint)
    • Line 42: warning: comment on exported function TotalRequests should be of the form "TotalRequests ..." (golint)
    • gort/dataaccess/postgres/request-access.go
    • Line 32: warning: exported method PostgresDataAccess.RequestBegin should have comment or be unexported (golint)
    • Line 78: warning: exported method PostgresDataAccess.RequestError should have comment or be unexported (golint)
    • Line 88: warning: exported method PostgresDataAccess.RequestUpdate should have comment or be unexported (golint)
    • Line 128: warning: exported method PostgresDataAccess.RequestClose should have comment or be unexported (golint)
    • gort/command/command.go
    • Line 42: warning: exported method Command.OptionsValues should have comment or be unexported (golint)
    • Line 59: warning: exported type CommandParameters should have comment or be unexported (golint)
    • Line 177: warning: exported type ParseOption should have comment or be unexported (golint)
    • gort/relay/relay.go
    • Line 36: warning: exported const ExitOK should have comment (or a comment on this block) or be unexported (golint)
    • Line 173: warning: exported function AuthorizeUser should have comment or be unexported (golint)
    • gort/dataaccess/memory/request-access.go
    • Line 28: warning: comment on exported method InMemoryDataAccess.RequestBegin should be of the form "RequestBegin ..." (golint)
    • Line 43: warning: comment on exported method InMemoryDataAccess.RequestError should be of the form "RequestError ..." (golint)
    • Line 56: warning: comment on exported method InMemoryDataAccess.RequestUpdate should be of the form "RequestUpdate ..." (golint)
    • Line 69: warning: comment on exported method InMemoryDataAccess.RequestClose should be of the form "RequestClose ..." (golint)
    • gort/rules/condition.go
    • Line 21: warning: exported type LogicalOperator should have comment or be unexported (golint)
    • Line 24: warning: exported const Undefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type EvaluationEnvironment should have comment or be unexported (golint)
    • Line 39: warning: exported method Expression.Evaluate should have comment or be unexported (golint)
    • gort/dataaccess/postgres/role-access.go
    • Line 63: warning: comment on exported method PostgresDataAccess.RoleDelete should be of the form "RoleDelete ..." (golint)
    • Line 167: warning: exported method PostgresDataAccess.RoleGrantPermission should have comment or be unexported (golint)
    • Line 208: warning: exported method PostgresDataAccess.RoleRevokePermission should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words