Preparing report...

Report for github.com/nyaruka/goflow

A+    Excellent!    Found 82 issues across 380 files

Tweet

gofmt98%

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!


gocyclo96%

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.

    • goflow/flows/field.go
    • Line 58: warning: cyclomatic complexity 20 of function (*Value).Equals() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 16 of function (FieldValues).Parse() is high (> 15) (gocyclo)
    • goflow/contactql/es/query.go
    • Line 179: warning: cyclomatic complexity 58 of function attributeConditionToElastic() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 31 of function fieldConditionToElastic() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • goflow/flows/resumes/base.go
    • Line 36: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 82: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • goflow/flows/field.go
    • Line 353: warning: exported method FieldAssets.ResolveField should have comment or be unexported (golint)
    • Line 361: warning: exported method FieldAssets.ResolveGroup should have comment or be unexported (golint)
    • goflow/assets/static/types/global.go
    • Line 9: warning: don't use underscores in Go names; struct field Key_ should be Key (golint)
    • Line 10: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 11: warning: don't use underscores in Go names; struct field Value_ should be Value (golint)
    • goflow/flows/events/base.go
    • Line 23: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • Line 24: warning: don't use underscores in Go names; struct field CreatedOn_ should be CreatedOn (golint)
    • Line 25: warning: don't use underscores in Go names; struct field StepUUID_ should be StepUUID (golint)
    • goflow/flows/modifiers/field.go
    • Line 57: warning: exported method FieldModifier.Value should have comment or be unexported (golint)
    • Line 102: warning: exported method FieldModifier.MarshalJSON should have comment or be unexported (golint)
    • goflow/flows/routers/category.go
    • Line 12: warning: exported type Category should have comment or be unexported (golint)
    • Line 23: warning: exported method Category.UUID should have comment or be unexported (golint)
    • Line 24: warning: exported method Category.Name should have comment or be unexported (golint)
    • Line 25: warning: exported method Category.ExitUUID should have comment or be unexported (golint)
    • goflow/flows/routers/waits/base.go
    • Line 24: warning: exported type Timeout should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; struct field Seconds_ should be Seconds (golint)
    • Line 26: warning: don't use underscores in Go names; struct field CategoryUUID_ should be CategoryUUID (golint)
    • Line 29: warning: exported function NewTimeout should have comment or be unexported (golint)
    • Line 33: warning: exported method Timeout.Seconds should have comment or be unexported (golint)
    • Line 35: warning: exported method Timeout.CategoryUUID should have comment or be unexported (golint)
    • Line 39: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 59: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • goflow/flows/definition/legacy/definition.go
    • Line 52: warning: exported type Rule should have comment or be unexported (golint)
    • Line 60: warning: exported type RuleSet should have comment or be unexported (golint)
    • Line 72: warning: exported type ActionSet should have comment or be unexported (golint)
    • Line 81: warning: exported type LabelReference should have comment or be unexported (golint)
    • Line 115: warning: exported type ContactReference should have comment or be unexported (golint)
    • Line 120: warning: exported type GroupReference should have comment or be unexported (golint)
    • Line 125: warning: exported method GroupReference.Migrate should have comment or be unexported (golint)
    • Line 161: warning: exported type VariableReference should have comment or be unexported (golint)
    • Line 165: warning: exported type FlowReference should have comment or be unexported (golint)
    • Line 181: warning: exported type WebhookHeader should have comment or be unexported (golint)
    • Line 186: warning: exported type Action should have comment or be unexported (golint)
    • goflow/services/classification/luis/client.go
    • Line 15: warning: exported type ExtractedIntent should have comment or be unexported (golint)
    • Line 20: warning: exported type ExtractedEntity should have comment or be unexported (golint)
    • Line 28: warning: exported type SentimentAnalysis should have comment or be unexported (golint)
    • goflow/flows/engine/session.go
    • Line 34: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 60: warning: don't use underscores in Go names; method parameter type_ should be type (golint)
    • goflow/test/assets.go
    • Line 33: warning: exported function LoadFlowFromAssets should have comment or be unexported (golint)
    • Line 42: warning: exported function NewChannel should have comment or be unexported (golint)
    • Line 46: warning: exported function NewTelChannel should have comment or be unexported (golint)
    • Line 50: warning: exported function NewClassifier should have comment or be unexported (golint)
    • Line 50: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • goflow/envs/environment.go
    • Line 12: warning: exported type RedactionPolicy should have comment or be unexported (golint)
    • Line 15: warning: exported const RedactionPolicyNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 162: warning: comment on exported function NewBuilder should be of the form "NewBuilder ..." (golint)
    • Line 191: warning: exported method EnvironmentBuilder.WithTimezone should have comment or be unexported (golint)
    • Line 196: warning: exported method EnvironmentBuilder.WithDefaultLanguage should have comment or be unexported (golint)
    • Line 201: warning: exported method EnvironmentBuilder.WithAllowedLanguages should have comment or be unexported (golint)
    • Line 206: warning: exported method EnvironmentBuilder.WithDefaultCountry should have comment or be unexported (golint)
    • Line 211: warning: exported method EnvironmentBuilder.WithNumberFormat should have comment or be unexported (golint)
    • Line 216: warning: exported method EnvironmentBuilder.WithRedactionPolicy should have comment or be unexported (golint)
    • Line 221: warning: exported method EnvironmentBuilder.WithMaxValueLength should have comment or be unexported (golint)
    • goflow/envs/locations.go
    • Line 25: warning: exported const LocationPathSeparator should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported function NewLocationPath should have comment or be unexported (golint)
    • Line 218: warning: exported method LocationHierarchy.UnmarshalJSON should have comment or be unexported (golint)
    • goflow/mobile/bindings.go
    • Line 134: warning: exported method MsgIn.Text should have comment or be unexported (golint)
    • Line 138: warning: exported method MsgIn.Attachments should have comment or be unexported (golint)
    • Line 191: warning: exported type Event should have comment or be unexported (golint)
    • Line 192: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 196: warning: exported method Event.Type should have comment or be unexported (golint)
    • Line 200: warning: exported method Event.Payload should have comment or be unexported (golint)
    • Line 204: warning: exported type Modifier should have comment or be unexported (golint)
    • Line 205: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 209: warning: exported method Modifier.Type should have comment or be unexported (golint)
    • Line 213: warning: exported method Modifier.Payload should have comment or be unexported (golint)
    • Line 283: warning: exported type Hint should have comment or be unexported (golint)
    • Line 287: warning: exported method Hint.Type should have comment or be unexported (golint)
    • Line 291: warning: exported type Wait should have comment or be unexported (golint)
    • Line 295: warning: exported method Wait.Type should have comment or be unexported (golint)
    • Line 299: warning: exported method Wait.Hint should have comment or be unexported (golint)
    • Line 307: warning: exported type Engine should have comment or be unexported (golint)
    • Line 311: warning: exported function NewEngine should have comment or be unexported (golint)
    • Line 345: warning: exported method SessionAndSprint.Session should have comment or be unexported (golint)
    • Line 349: warning: exported method SessionAndSprint.Sprint should have comment or be unexported (golint)
    • goflow/flows/triggers/base.go
    • Line 35: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 110: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • goflow/services/airtime/dtone/client.go
    • Line 16: warning: exported type StatusCID should have comment or be unexported (golint)
    • Line 21: warning: comment on exported const StatusCIDCreated should be of the form "StatusCIDCreated ..." (golint)
    • Line 23: warning: exported const StatusCIDConfirmed should have comment (or a comment on this block) or be unexported (golint)
    • goflow/flows/info.go
    • Line 78: warning: exported type ExtractedResult should have comment or be unexported (golint)
    • Line 85: warning: exported type ResultSpec should have comment or be unexported (golint)
    • goflow/flows/msg.go
    • Line 36: warning: don't use underscores in Go names; struct field ID_ should be ID (golint)
    • Line 37: warning: don't use underscores in Go names; struct field URN_ should be URN (golint)
    • Line 38: warning: don't use underscores in Go names; struct field Channel_ should be Channel (golint)
    • Line 39: warning: don't use underscores in Go names; struct field Text_ should be Text (golint)
    • Line 40: warning: don't use underscores in Go names; struct field Attachments_ should be Attachments (golint)
    • Line 47: warning: don't use underscores in Go names; struct field ExternalID_ should be ExternalID (golint)
    • Line 54: warning: don't use underscores in Go names; struct field QuickReplies_ should be QuickReplies (golint)
    • Line 55: warning: don't use underscores in Go names; struct field Templating_ should be Templating (golint)
    • Line 56: warning: don't use underscores in Go names; struct field Topic_ should be Topic (golint)
    • Line 152: warning: don't use underscores in Go names; struct field Template_ should be Template (golint)
    • Line 153: warning: don't use underscores in Go names; struct field Language_ should be Language (golint)
    • Line 154: warning: don't use underscores in Go names; struct field Country_ should be Country (golint)
    • Line 155: warning: don't use underscores in Go names; struct field Variables_ should be Variables (golint)
    • Line 156: warning: don't use underscores in Go names; struct field Namespace_ should be Namespace (golint)
    • goflow/assets/static/types/flow.go
    • Line 16: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 17: warning: don't use underscores in Go names; struct field Definition_ should be Definition (golint)
    • Line 26: warning: exported method Flow.Definition should have comment or be unexported (golint)
    • Line 28: warning: exported method Flow.UnmarshalJSON should have comment or be unexported (golint)
    • goflow/assets/static/types/classifier.go
    • Line 10: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 11: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • Line 12: warning: don't use underscores in Go names; struct field Intents_ should be Intents (golint)
    • Line 16: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • goflow/flows/inspect/dependencies.go
    • Line 13: warning: exported type Dependency should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; struct field Reference_ should be Reference (golint)
    • Line 15: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • Line 16: warning: don't use underscores in Go names; struct field Missing_ should be Missing (golint)
    • Line 19: warning: exported method Dependency.Reference should have comment or be unexported (golint)
    • Line 23: warning: exported method Dependency.Type should have comment or be unexported (golint)
    • Line 27: warning: exported method Dependency.Missing should have comment or be unexported (golint)
    • Line 31: warning: exported method Dependency.MarshalJSON should have comment or be unexported (golint)
    • goflow/assets/static/types/ticketer.go
    • Line 10: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 11: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • Line 15: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • goflow/assets/static/types/field.go
    • Line 10: warning: don't use underscores in Go names; struct field Key_ should be Key (golint)
    • Line 11: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 12: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • goflow/flows/inspect/issues/base.go
    • Line 12: warning: exported var RegisteredTypes should have comment or be unexported (golint)
    • Line 21: warning: don't use underscores in Go names; struct field Type_ should be Type (golint)
    • Line 22: warning: don't use underscores in Go names; struct field NodeUUID_ should be NodeUUID (golint)
    • Line 23: warning: don't use underscores in Go names; struct field ActionUUID_ should be ActionUUID (golint)
    • Line 24: warning: don't use underscores in Go names; struct field Language_ should be Language (golint)
    • Line 25: warning: don't use underscores in Go names; struct field Description_ should be Description (golint)
    • goflow/flows/routers/waits/dial.go
    • Line 69: warning: exported type ActivatedDialWait should have comment or be unexported (golint)
    • Line 75: warning: exported function NewActivatedDialWait should have comment or be unexported (golint)
    • Line 82: warning: exported method ActivatedDialWait.URN should have comment or be unexported (golint)
    • goflow/assets/static/types/channel.go
    • Line 12: warning: don't use underscores in Go names; struct field Name_ should be Name (golint)
    • Line 13: warning: don't use underscores in Go names; struct field Address_ should be Address (golint)
    • Line 14: warning: don't use underscores in Go names; struct field Schemes_ should be Schemes (golint)
    • Line 15: warning: don't use underscores in Go names; struct field Roles_ should be Roles (golint)
    • Line 16: warning: don't use underscores in Go names; struct field Parent_ should be Parent (golint)
    • Line 17: warning: don't use underscores in Go names; struct field Country_ should be Country (golint)
    • Line 18: warning: don't use underscores in Go names; struct field MatchPrefixes_ should be MatchPrefixes (golint)
    • Line 19: warning: don't use underscores in Go names; struct field AllowInternational_ should be AllowInternational (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words