Preparing report...

Report for github.com/go-ap/activitypub

B    Not bad!    Found 40 issues across 57 files

Tweet

gofmt50%

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.


golint57%

Golint is a linter for Go source code.

    • activitypub/helpers.go
    • Line 20: warning: comment on exported function OnLink should be of the form "OnLink ..." (golint)
    • Line 29: warning: comment on exported function OnObject should be of the form "OnObject ..." (golint)
    • Line 48: warning: comment on exported function OnActivity should be of the form "OnActivity ..." (golint)
    • Line 67: warning: comment on exported function OnIntransitiveActivity should be of the form "OnIntransitiveActivity ..." (golint)
    • Line 86: warning: comment on exported function OnQuestion should be of the form "OnQuestion ..." (golint)
    • Line 105: warning: comment on exported function OnActor should be of the form "OnActor ..." (golint)
    • Line 123: warning: comment on exported function OnCollection should be of the form "OnCollection ..." (golint)
    • Line 132: warning: comment on exported function OnCollectionIntf should be of the form "OnCollectionIntf ..." (golint)
    • Line 174: warning: comment on exported function OnCollectionPage should be of the form "OnCollectionPage ..." (golint)
    • Line 183: warning: comment on exported function OnOrderedCollection should be of the form "OnOrderedCollection ..." (golint)
    • Line 317: warning: comment on exported function NotEmpty should be of the form "NotEmpty ..." (golint)
    • activitypub/ordered_collection_page.go
    • Line 189: warning: comment on exported method OrderedCollectionPage.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 194: warning: comment on exported method OrderedCollectionPage.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 255: warning: comment on exported function ToOrderedCollectionPage should be of the form "ToOrderedCollectionPage ..." (golint)
    • Line 276: warning: comment on exported method OrderedCollectionPage.ItemsMatch should be of the form "ItemsMatch ..." (golint)
    • Line 286: warning: comment on exported method OrderedCollectionPage.Equals should be of the form "Equals ..." (golint)
    • activitypub/link.go
    • Line 8: warning: exported var LinkTypes should have comment or be unexported (golint)
    • Line 93: warning: comment on exported method Link.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 105: warning: comment on exported method Link.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 112: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • activitypub/ordered_collection.go
    • Line 152: warning: comment on exported type Outbox should be of the form "Outbox ..." (with optional leading article) (golint)
    • Line 227: warning: comment on exported method OrderedCollection.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 232: warning: comment on exported method OrderedCollection.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 296: warning: comment on exported function ToOrderedCollection should be of the form "ToOrderedCollection ..." (golint)
    • Line 370: warning: comment on exported function LikedNew should be of the form "LikedNew ..." (golint)
    • Line 383: warning: comment on exported function LikesNew should be of the form "LikesNew ..." (golint)
    • Line 422: warning: comment on exported method OrderedCollection.ItemsMatch should be of the form "ItemsMatch ..." (golint)
    • Line 432: warning: comment on exported method OrderedCollection.Equals should be of the form "Equals ..." (golint)
    • activitypub/profile.go
    • Line 140: warning: comment on exported method Profile.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 145: warning: comment on exported method Profile.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 199: warning: comment on exported function ToProfile should be of the form "ToProfile ..." (golint)
    • Line 224: warning: exported function OnProfile should have comment or be unexported (golint)
    • activitypub/decoding_gob.go
    • Line 8: warning: exported function GobEncode should have comment or be unexported (golint)
    • Line 18: warning: exported function GobUnmarshalToItem should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function UnmarshalGob should be of the form "UnmarshalGob ..." (golint)
    • activitypub/decoding_json.go
    • Line 30: warning: exported function JSONGetID should have comment or be unexported (golint)
    • Line 38: warning: exported function JSONGetType should have comment or be unexported (golint)
    • Line 46: warning: exported function JSONGetMimeType should have comment or be unexported (golint)
    • Line 54: warning: exported function JSONGetInt should have comment or be unexported (golint)
    • Line 68: warning: exported function JSONGetFloat should have comment or be unexported (golint)
    • Line 82: warning: exported function JSONGetString should have comment or be unexported (golint)
    • Line 89: warning: exported function JSONGetBytes should have comment or be unexported (golint)
    • Line 96: warning: exported function JSONGetBoolean should have comment or be unexported (golint)
    • Line 103: warning: exported function JSONGetNaturalLanguageField should have comment or be unexported (golint)
    • Line 132: warning: exported function JSONGetTime should have comment or be unexported (golint)
    • Line 141: warning: exported function JSONGetDuration should have comment or be unexported (golint)
    • Line 150: warning: exported function JSONGetPublicKey should have comment or be unexported (golint)
    • Line 156: warning: exported function JSONGetStreams should have comment or be unexported (golint)
    • Line 191: warning: exported function JSONUnmarshalToItem should have comment or be unexported (golint)
    • Line 247: warning: exported function JSONGetItem should have comment or be unexported (golint)
    • Line 276: warning: exported function JSONGetURIItem should have comment or be unexported (golint)
    • Line 310: warning: exported function JSONGetItems should have comment or be unexported (golint)
    • Line 341: warning: exported function JSONGetLangRefField should have comment or be unexported (golint)
    • Line 349: warning: exported function JSONGetIRI should have comment or be unexported (golint)
    • Line 366: warning: exported function GetItemByType should have comment or be unexported (golint)
    • Line 485: warning: exported function JSONGetActorEndpoints should have comment or be unexported (golint)
    • activitypub/intransitive_activity.go
    • Line 178: warning: comment on exported method IntransitiveActivity.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 183: warning: comment on exported method IntransitiveActivity.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 227: warning: comment on exported function ToIntransitiveActivity should be of the form "ToIntransitiveActivity ..." (golint)
    • activitypub/iri.go
    • Line 16: warning: comment on exported const PublicNS should be of the form "PublicNS ..." (golint)
    • Line 20: warning: exported var JsonLDContext should have comment or be unexported (golint)
    • Line 28: warning: exported type IRIs should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method IRI.GetLink should be of the form "GetLink ..." (golint)
    • Line 41: warning: comment on exported method IRI.URL should be of the form "URL ..." (golint)
    • Line 46: warning: comment on exported method IRI.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 52: warning: comment on exported method IRI.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 99: warning: comment on exported method IRI.GetID should be of the form "GetID ..." (golint)
    • Line 104: warning: comment on exported method IRI.GetType should be of the form "GetType ..." (golint)
    • Line 109: warning: comment on exported method IRI.IsLink should be of the form "IsLink ..." (golint)
    • Line 114: warning: comment on exported method IRI.IsObject should be of the form "IsObject ..." (golint)
    • Line 132: warning: exported method IRIs.MarshalJSON should have comment or be unexported (golint)
    • Line 153: warning: exported method IRIs.UnmarshalJSON should have comment or be unexported (golint)
    • Line 254: warning: exported method IRI.Contains should have comment or be unexported (golint)
    • Line 281: warning: exported method IRI.ItemsMatch should have comment or be unexported (golint)
    • activitypub/item.go
    • Line 7: warning: exported const EmptyIRI should have comment (or a comment on this block) or be unexported (golint)
    • activitypub/relationship.go
    • Line 150: warning: comment on exported method Relationship.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 155: warning: comment on exported method Relationship.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 216: warning: comment on exported function ToRelationship should be of the form "ToRelationship ..." (golint)
    • Line 239: warning: exported function OnRelationship should have comment or be unexported (golint)
    • activitypub/activity.go
    • Line 43: warning: exported method ActivityVocabularyTypes.Contains should have comment or be unexported (golint)
    • Line 155: warning: exported var IntransitiveActivityTypes should have comment or be unexported (golint)
    • Line 161: warning: exported var ActivityTypes should have comment or be unexported (golint)
    • Line 717: warning: comment on exported method Activity.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 722: warning: comment on exported function ToActivity should be of the form "ToActivity ..." (golint)
    • Line 749: warning: comment on exported method Activity.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • activitypub/actor.go
    • Line 20: warning: exported var ActorTypes should have comment or be unexported (golint)
    • Line 195: warning: exported method PublicKey.UnmarshalJSON should have comment or be unexported (golint)
    • Line 214: warning: exported method PublicKey.MarshalJSON should have comment or be unexported (golint)
    • Line 329: warning: exported method Actor.Recipients should have comment or be unexported (golint)
    • Line 333: warning: exported method Actor.Clean should have comment or be unexported (golint)
    • Line 338: warning: exported method Actor.UnmarshalJSON should have comment or be unexported (golint)
    • Line 342: warning: exported method Actor.MarshalJSON should have comment or be unexported (golint)
    • Line 417: warning: comment on exported method Endpoints.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 428: warning: comment on exported method Endpoints.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 459: warning: comment on exported function ToActor should be of the form "ToActor ..." (golint)
    • activitypub/place.go
    • Line 154: warning: comment on exported method Place.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 159: warning: comment on exported method Place.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 227: warning: comment on exported function ToPlace should be of the form "ToPlace ..." (golint)
    • Line 256: warning: exported function OnPlace should have comment or be unexported (golint)
    • activitypub/tombstone.go
    • Line 142: warning: comment on exported method Tombstone.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 147: warning: comment on exported method Tombstone.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 206: warning: comment on exported function ToTombstone should be of the form "ToTombstone ..." (golint)
    • Line 231: warning: exported function OnTombstone should have comment or be unexported (golint)
    • activitypub/question.go
    • Line 165: warning: comment on exported method Question.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 170: warning: exported method Question.MarshalJSON should have comment or be unexported (golint)
    • Line 211: warning: comment on exported function ToQuestion should be of the form "ToQuestion ..." (golint)
    • activitypub/collection.go
    • Line 10: warning: exported const CollectionOfItems should have comment or be unexported (golint)
    • Line 12: warning: exported var CollectionTypes should have comment or be unexported (golint)
    • Line 20: warning: exported type CollectionInterface should have comment or be unexported (golint)
    • Line 231: warning: comment on exported method Collection.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 236: warning: comment on exported method Collection.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 286: warning: comment on exported function ToCollection should be of the form "ToCollection ..." (golint)
    • Line 325: warning: comment on exported method Collection.ItemsMatch should be of the form "ItemsMatch ..." (golint)
    • Line 335: warning: comment on exported method Collection.Equals should be of the form "Equals ..." (golint)
    • activitypub/collection_page.go
    • Line 186: warning: comment on exported method CollectionPage.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 191: warning: comment on exported method CollectionPage.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 250: warning: comment on exported function CollectionPageNew should be of the form "CollectionPageNew ..." (golint)
    • Line 298: warning: comment on exported function ToCollectionPage should be of the form "ToCollectionPage ..." (golint)
    • Line 319: warning: comment on exported method CollectionPage.ItemsMatch should be of the form "ItemsMatch ..." (golint)
    • Line 329: warning: comment on exported method CollectionPage.Equals should be of the form "Equals ..." (golint)
    • activitypub/item_collection.go
    • Line 37: warning: exported method ItemCollection.MarshalJSON should have comment or be unexported (golint)
    • Line 160: warning: comment on exported function ToItemCollection should be of the form "ToItemCollection ..." (golint)
    • Line 179: warning: comment on exported method ItemCollection.ItemsMatch should be of the form "ItemsMatch ..." (golint)
    • Line 189: warning: comment on exported method ItemCollection.Equals should be of the form "Equals ..." (golint)
    • activitypub/natural_language_values.go
    • Line 11: warning: exported const NilLangRef should have comment or be unexported (golint)
    • Line 16: warning: exported type Content should have comment or be unexported (golint)
    • Line 27: warning: exported function NaturalLanguageValuesNew should have comment or be unexported (golint)
    • Line 48: warning: exported method NaturalLanguageValues.Get should have comment or be unexported (golint)
    • Line 245: warning: exported method LangRefValue.Equals should have comment or be unexported (golint)
    • Line 249: warning: exported method Content.UnmarshalJSON should have comment or be unexported (golint)
    • Line 252: warning: exported method Content.UnmarshalText should have comment or be unexported (golint)
    • Line 271: warning: exported method Content.Equals should have comment or be unexported (golint)
    • Line 328: warning: comment on exported method NaturalLanguageValues.Equals should be of the form "Equals ..." (golint)
    • activitypub/object.go
    • Line 13: warning: exported const ObjectType should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: comment on exported const ArticleType should be of the form "ArticleType ..." (golint)
    • Line 41: warning: exported var GenericTypes should have comment or be unexported (golint)
    • Line 48: warning: exported var ObjectTypes should have comment or be unexported (golint)
    • Line 102: warning: exported method ActivityVocabularyType.MarshalJSON should have comment or be unexported (golint)
    • Line 280: warning: comment on exported method Object.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 285: warning: comment on exported method Object.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 355: warning: comment on exported method MimeType.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 361: warning: comment on exported method MimeType.MarshalJSON should be of the form "MarshalJSON ..." (golint)
    • Line 479: warning: comment on exported function GetAPSource should be of the form "GetAPSource ..." (golint)
    • Line 493: warning: comment on exported method Source.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 499: warning: comment on exported method Source.MarshalJSON should be of the form "MarshalJSON ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.

    • activitypub/flatten.go
    • Line 22: warning: ineffectual assignment to o (ineffassign)
    • Line 64: warning: ineffectual assignment to o (ineffassign)
    • Line 89: warning: ineffectual assignment to a (ineffassign)
    • Line 95: warning: ineffectual assignment to a (ineffassign)
    • Line 101: warning: ineffectual assignment to o (ineffassign)

misspell89%

Misspell Finds commonly misspelled English words