Preparing report...

Report for github.com/Mother-Earth/me-libp2p

(v0.0.1)

A+    Excellent!    Found 15 issues across 45 files

Tweet

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!


gofmt95%

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


gocyclo68%

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.

    • gossipsub.go
    • Line 1316: warning: cyclomatic complexity 51 of function (*GossipSubRouter).heartbeat() is high (> 15) (gocyclo)
    • Line 956: warning: cyclomatic complexity 21 of function (*GossipSubRouter).Publish() is high (> 15) (gocyclo)
    • Line 1175: warning: cyclomatic complexity 17 of function fragmentRPC() is high (> 15) (gocyclo)
    • mcache_test.go
    • Line 11: warning: cyclomatic complexity 35 of function TestMessageCache() is high (> 15) (gocyclo)
    • validation.go
    • Line 274: warning: cyclomatic complexity 17 of function (*validation).validate() is high (> 15) (gocyclo)
    • discovery.go
    • Line 241: warning: cyclomatic complexity 17 of function (*discover).Bootstrap() is high (> 15) (gocyclo)
    • score_params.go
    • Line 200: warning: cyclomatic complexity 46 of function (*TopicScoreParams).validate() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 22 of function (*PeerScoreParams).validate() is high (> 15) (gocyclo)
    • gossipsub_test.go
    • Line 2123: warning: cyclomatic complexity 26 of function TestFragmentRPCFunction() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 16 of function TestGossipsubGossipPropagation() is high (> 15) (gocyclo)
    • pubsub.go
    • Line 517: warning: cyclomatic complexity 33 of function (*PubSub).processLoop() is high (> 15) (gocyclo)
    • Line 988: warning: cyclomatic complexity 18 of function (*PubSub).handleIncomingRPC() is high (> 15) (gocyclo)
    • score_params_test.go
    • Line 50: warning: cyclomatic complexity 24 of function TestTopicScoreParamsValidation() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 17 of function TestPeerScoreParamsValidation() is high (> 15) (gocyclo)
    • topic_test.go
    • Line 405: warning: cyclomatic complexity 19 of function TestSubscriptionManyNotifications() is high (> 15) (gocyclo)
    • Line 131: warning: cyclomatic complexity 17 of function TestTopicReuse() is high (> 15) (gocyclo)
    • gossipsub_spam_test.go
    • Line 365: warning: cyclomatic complexity 29 of function TestGossipsubAttackGRAFTDuringBackoff() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 19 of function TestGossipsubAttackSpamIHAVE() is high (> 15) (gocyclo)

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!


misspell88%

Misspell Finds commonly misspelled English words

    • score_params.go
    • Line 13: warning: "supressed" is a misspelling of "suppressed" (misspell)
    • Line 21: warning: "supressed" is a misspelling of "suppressed" (misspell)
    • Line 71: warning: "managable" is a misspelling of "manageable" (misspell)
    • score_test.go
    • Line 970: warning: "paramaters" is a misspelling of "parameters" (misspell)
    • Line 1044: warning: "paramaters" is a misspelling of "parameters" (misspell)