Preparing report...

Report for github.com/writefreely/writefreely

(v0.13.2)

A+    Excellent!    Found 18 issues across 92 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!


gofmt98%

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


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.

    • posts.go
    • Line 1370: warning: cyclomatic complexity 56 of function viewCollectionPost() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 54 of function handleViewPost() is high (> 15) (gocyclo)
    • Line 522: warning: cyclomatic complexity 33 of function newPost() is high (> 15) (gocyclo)
    • Line 661: warning: cyclomatic complexity 29 of function existingPost() is high (> 15) (gocyclo)
    • Line 794: warning: cyclomatic complexity 26 of function deletePost() is high (> 15) (gocyclo)
    • account.go
    • Line 390: warning: cyclomatic complexity 38 of function login() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 21 of function signupWithRegistration() is high (> 15) (gocyclo)
    • Line 883: warning: cyclomatic complexity 17 of function updateSettings() is high (> 15) (gocyclo)
    • activitypub.go
    • Line 293: warning: cyclomatic complexity 36 of function handleFetchCollectionInbox() is high (> 15) (gocyclo)
    • Line 664: warning: cyclomatic complexity 18 of function federatePost() is high (> 15) (gocyclo)
    • collections.go
    • Line 768: warning: cyclomatic complexity 26 of function handleViewCollection() is high (> 15) (gocyclo)
    • Line 639: warning: cyclomatic complexity 21 of function processCollectionPermissions() is high (> 15) (gocyclo)
    • Line 1012: warning: cyclomatic complexity 17 of function existingCollection() is high (> 15) (gocyclo)
    • Line 369: warning: cyclomatic complexity 17 of function newCollection() is high (> 15) (gocyclo)
    • oauth.go
    • Line 324: warning: cyclomatic complexity 19 of function (oauthHandler).viewOauthCallback() is high (> 15) (gocyclo)
    • read.go
    • Line 184: warning: cyclomatic complexity 17 of function showLocalTimeline() is high (> 15) (gocyclo)
    • handle.go
    • Line 390: warning: cyclomatic complexity 16 of function (*Handler).WebErrors() is high (> 15) (gocyclo)
    • database.go
    • Line 853: warning: cyclomatic complexity 30 of function (*datastore).UpdateCollection() is high (> 15) (gocyclo)
    • Line 1926: warning: cyclomatic complexity 30 of function (*datastore).ChangeSettings() is high (> 15) (gocyclo)
    • Line 1399: warning: cyclomatic complexity 26 of function (*datastore).ClaimPosts() is high (> 15) (gocyclo)
    • Line 2240: warning: cyclomatic complexity 19 of function (*datastore).DeleteAccount() is high (> 15) (gocyclo)
    • Line 613: warning: cyclomatic complexity 19 of function (*datastore).CreatePost() is high (> 15) (gocyclo)
    • pad.go
    • Line 23: warning: cyclomatic complexity 20 of function handleViewPad() is high (> 15) (gocyclo)
    • db/create.go
    • Line 68: warning: cyclomatic complexity 19 of function (ColumnType).Format() is high (> 15) (gocyclo)
    • semver.go
    • Line 77: warning: cyclomatic complexity 17 of function semParse() is high (> 15) (gocyclo)

ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • oauth_signup.go
    • Line 164: warning: ineffectual assignment to collTitle (ineffassign)
    • Line 164: warning: ineffectual assignment to collTitle (ineffassign)
    • session.go
    • Line 93: warning: ineffectual assignment to u (ineffassign)
    • Line 120: warning: ineffectual assignment to u (ineffassign)
    • Line 93: warning: ineffectual assignment to u (ineffassign)
    • Line 120: warning: ineffectual assignment to u (ineffassign)
    • sitemap.go
    • Line 49: warning: ineffectual assignment to host (ineffassign)
    • Line 49: warning: ineffectual assignment to host (ineffassign)
    • nodeinfo.go
    • Line 90: warning: ineffectual assignment to err (ineffassign)
    • Line 98: warning: ineffectual assignment to err (ineffassign)
    • Line 90: warning: ineffectual assignment to err (ineffassign)
    • Line 98: warning: ineffectual assignment to err (ineffassign)
    • handle.go
    • Line 764: warning: ineffectual assignment to status (ineffassign)
    • Line 769: warning: ineffectual assignment to status (ineffassign)
    • Line 764: warning: ineffectual assignment to status (ineffassign)
    • Line 769: warning: ineffectual assignment to status (ineffassign)
    • oauth.go
    • Line 410: warning: ineffectual assignment to displayName (ineffassign)
    • Line 410: warning: ineffectual assignment to displayName (ineffassign)
    • posts.go
    • Line 371: warning: ineffectual assignment to found (ineffassign)
    • Line 371: warning: ineffectual assignment to found (ineffassign)
    • account.go
    • Line 256: warning: ineffectual assignment to u (ineffassign)
    • Line 1177: warning: ineffectual assignment to s (ineffassign)
    • Line 256: warning: ineffectual assignment to u (ineffassign)
    • Line 1177: warning: ineffectual assignment to s (ineffassign)
    • database.go
    • Line 1274: warning: ineffectual assignment to err (ineffassign)
    • Line 2443: warning: ineffectual assignment to err (ineffassign)
    • Line 1274: warning: ineffectual assignment to err (ineffassign)
    • Line 2443: warning: ineffectual assignment to err (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!