Preparing report...

Report for github.com/go-ap/processing

B    Not bad!    Found 10 issues across 14 files

Tweet

gofmt64%

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!


gocyclo85%

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.

    • processing/processing.go
    • Line 188: warning: cyclomatic complexity 22 of function processActivity() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 18 of function AddToCollections() is high (> 15) (gocyclo)

golint42%

Golint is a linter for Go source code.

    • processing/negating.go
    • Line 57: warning: comment on exported function UndoActivity should be of the form "UndoActivity ..." (golint)
    • Line 102: warning: comment on exported function UndoAppreciationActivity should be of the form "UndoAppreciationActivity ..." (golint)
    • processing/processing.go
    • Line 13: warning: exported type Processor should have comment or be unexported (golint)
    • Line 17: warning: exported type Validator should have comment or be unexported (golint)
    • Line 36: warning: exported function New should have comment or be unexported (golint)
    • Line 60: warning: exported function SetIDGenerator should have comment or be unexported (golint)
    • Line 67: warning: exported function SetInfoLogger should have comment or be unexported (golint)
    • Line 75: warning: exported function SetErrorLogger should have comment or be unexported (golint)
    • Line 83: warning: exported function SetClient should have comment or be unexported (golint)
    • Line 91: warning: exported function SetStorage should have comment or be unexported (golint)
    • Line 99: warning: exported function SetIRI should have comment or be unexported (golint)
    • processing/reactions.go
    • Line 43: warning: comment on exported function AppreciationActivity should be of the form "AppreciationActivity ..." (golint)
    • Line 84: warning: comment on exported function AcceptActivity should be of the form "AcceptActivity ..." (golint)
    • Line 131: warning: exported function RejectActivity should have comment or be unexported (golint)
    • Line 153: warning: comment on exported function BlockActivity should be of the form "BlockActivity ..." (golint)
    • Line 184: warning: comment on exported function FlagActivity should be of the form "FlagActivity ..." (golint)
    • processing/validation.go
    • Line 17: warning: exported type ClientActivityValidator should have comment or be unexported (golint)
    • Line 25: warning: exported type ServerActivityValidator should have comment or be unexported (golint)
    • Line 79: warning: exported type ActivityPubError should have comment or be unexported (golint)
    • Line 83: warning: exported type MissingActorError should have comment or be unexported (golint)
    • Line 87: warning: exported var InvalidActivity should have comment or be unexported (golint)
    • Line 90: warning: exported var MissingActivityActor should have comment or be unexported (golint)
    • Line 93: warning: exported var InvalidActivityActor should have comment or be unexported (golint)
    • Line 96: warning: exported var InvalidActivityObject should have comment or be unexported (golint)
    • Line 99: warning: exported var InvalidIRI should have comment or be unexported (golint)
    • Line 102: warning: exported var InvalidTarget should have comment or be unexported (golint)
    • Line 106: warning: exported method MissingActorError.Is should have comment or be unexported (golint)
    • Line 156: warning: exported function IsOutbox should have comment or be unexported (golint)
    • Line 160: warning: exported function IsInbox should have comment or be unexported (golint)
    • Line 281: warning: comment on exported function ValidateClientContentManagementActivity should be of the form "ValidateClientContentManagementActivity ..." (golint)
    • Line 319: warning: comment on exported function ValidateClientCollectionManagementActivity should be of the form "ValidateClientCollectionManagementActivity ..." (golint)
    • Line 324: warning: comment on exported function ValidateClientReactionsActivity should be of the form "ValidateClientReactionsActivity ..." (golint)
    • Line 329: warning: comment on exported function ValidateClientEventRSVPActivity should be of the form "ValidateClientEventRSVPActivity ..." (golint)
    • Line 334: warning: comment on exported function ValidateClientGroupManagementActivity should be of the form "ValidateClientGroupManagementActivity ..." (golint)
    • Line 339: warning: comment on exported function ValidateClientContentExperienceActivity should be of the form "ValidateClientContentExperienceActivity ..." (golint)
    • Line 344: warning: comment on exported function ValidateClientGeoSocialEventsActivity should be of the form "ValidateClientGeoSocialEventsActivity ..." (golint)
    • Line 349: warning: comment on exported function ValidateClientNotificationActivity should be of the form "ValidateClientNotificationActivity ..." (golint)
    • Line 354: warning: comment on exported function ValidateClientQuestionActivity should be of the form "ValidateClientQuestionActivity ..." (golint)
    • Line 359: warning: comment on exported function ValidateClientRelationshipManagementActivity should be of the form "ValidateClientRelationshipManagementActivity ..." (golint)
    • Line 385: warning: comment on exported function ValidateClientNegatingActivity should be of the form "ValidateClientNegatingActivity ..." (golint)
    • Line 390: warning: comment on exported function ValidateClientOffersActivity should be of the form "ValidateClientOffersActivity ..." (golint)
    • Line 408: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 532: warning: exported type CtxtKey should have comment or be unexported (golint)
    • Line 534: warning: exported var ValidatorKey should have comment or be unexported (golint)
    • Line 536: warning: exported function ValidatorFromContext should have comment or be unexported (golint)
    • processing/content_management.go
    • Line 49: warning: exported function SetID should have comment or be unexported (golint)
    • Line 130: warning: comment on exported function CreateActivity should be of the form "CreateActivity ..." (golint)
    • Line 158: warning: comment on exported function UpdateActivity should be of the form "UpdateActivity ..." (golint)
    • processing/copy.go
    • Line 94: warning: comment on exported function UpdatePersonProperties should be of the form "UpdatePersonProperties ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!