Preparing report...

Report for github.com/schollz/cowyo

B    Not bad!    Found 13 issues across 16 files

Tweet

gofmt68%

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!


gocyclo93%

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.


golint43%

Golint is a linter for Go source code.

    • cowyo/server/page.go
    • Line 33: warning: exported method Page.LastEditTime should have comment or be unexported (golint)
    • Line 37: warning: exported method Page.LastEditUnixTime should have comment or be unexported (golint)
    • Line 41: warning: exported method Site.Open should have comment or be unexported (golint)
    • Line 58: warning: exported type DirectoryEntry should have comment or be unexported (golint)
    • Line 65: warning: exported method DirectoryEntry.LastEditTime should have comment or be unexported (golint)
    • Line 69: warning: exported method DirectoryEntry.Name should have comment or be unexported (golint)
    • Line 73: warning: exported method DirectoryEntry.Size should have comment or be unexported (golint)
    • Line 77: warning: exported method DirectoryEntry.Mode should have comment or be unexported (golint)
    • Line 81: warning: exported method DirectoryEntry.ModTime should have comment or be unexported (golint)
    • Line 85: warning: exported method DirectoryEntry.IsDir should have comment or be unexported (golint)
    • Line 89: warning: exported method DirectoryEntry.Sys should have comment or be unexported (golint)
    • Line 93: warning: exported method Site.DirectoryList should have comment or be unexported (golint)
    • Line 110: warning: exported type UploadEntry should have comment or be unexported (golint)
    • Line 114: warning: exported method Site.UploadList should have comment or be unexported (golint)
    • Line 129: warning: exported function DecodeFileName should have comment or be unexported (golint)
    • Line 151: warning: exported method Page.Render should have comment or be unexported (golint)
    • Line 166: warning: exported method Page.Save should have comment or be unexported (golint)
    • Line 176: warning: exported method Page.ChildPageNames should have comment or be unexported (golint)
    • Line 196: warning: exported method Page.IsNew should have comment or be unexported (golint)
    • Line 200: warning: exported method Page.Erase should have comment or be unexported (golint)
    • Line 205: warning: exported method Page.Published should have comment or be unexported (golint)
    • cowyo/server/utils.go
    • Line 142: warning: comment on exported function CheckPasswordHash should be of the form "CheckPasswordHash ..." (golint)
    • Line 159: warning: exported function MarkdownToHtml should have comment or be unexported (golint)
    • Line 178: warning: exported function GithubMarkdownToHTML should have comment or be unexported (golint)
    • cowyo/encrypt/encrypt.go
    • Line 10: warning: exported function EncryptString should have comment or be unexported (golint)
    • Line 20: warning: exported function DecryptString should have comment or be unexported (golint)
    • cowyo/config/config.go
    • Line 7: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 18: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported type SiteConfig should have comment or be unexported (golint)
    • Line 40: warning: exported type TLSConfig should have comment or be unexported (golint)
    • Line 46: warning: exported type CookieKey should have comment or be unexported (golint)
    • Line 51: warning: exported method Config.Validate should have comment or be unexported (golint)
    • cowyo/config/defaults.go
    • Line 7: warning: exported var DefaultSiteConfig should have comment or be unexported (golint)
    • Line 97: warning: exported method Config.SetDefaults should have comment or be unexported (golint)
    • cowyo/config/http.go
    • Line 13: warning: exported method Config.ListenAndServe should have comment or be unexported (golint)
    • Line 52: warning: exported method SiteConfig.MatchesRequest should have comment or be unexported (golint)
    • Line 85: warning: exported method SiteConfig.Handle should have comment or be unexported (golint)
    • cowyo/main.go
    • Line 28: warning: don't use underscores in Go names; var crt_f should be crtF (golint)
    • Line 29: warning: don't use underscores in Go names; var key_f should be keyF (golint)
    • cowyo/server/handlers.go
    • Line 29: warning: exported type Site should have comment or be unexported (golint)
    • Line 55: warning: exported var LogLevel should have comment or be unexported (golint)
    • Line 57: warning: exported function Serve should have comment or be unexported (golint)
    • Line 61: warning: don't use underscores in Go names; func parameter crt_path should be crtPath (golint)
    • Line 62: warning: don't use underscores in Go names; func parameter key_path should be keyPath (golint)
    • Line 112: warning: exported method Site.Router should have comment or be unexported (golint)
    • Line 276: warning: don't use underscores in Go names; method thread_SiteMap should be threadSiteMap (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign62%

IneffAssign detects ineffectual assignments in Go code.

    • cowyo/server/page_test.go
    • Line 10: warning: undeclared name: pathToData (ineffassign)
    • Line 11: warning: undeclared name: pathToData (ineffassign)
    • Line 12: warning: undeclared name: pathToData (ineffassign)
    • Line 13: warning: undeclared name: pathToData (ineffassign)
    • Line 37: warning: undeclared name: pathToData (ineffassign)
    • Line 38: warning: undeclared name: pathToData (ineffassign)
    • Line 39: warning: undeclared name: pathToData (ineffassign)
    • Line 40: warning: undeclared name: pathToData (ineffassign)
    • cowyo/server/handlers.go
    • Line 197: warning: undeclared name: Asset (ineffassign)
    • Line 332: warning: undeclared name: Asset (ineffassign)
    • Line 342: warning: undeclared name: Asset (ineffassign)
    • Line 197: warning: undeclared name: Asset (ineffassign)
    • Line 332: warning: undeclared name: Asset (ineffassign)
    • Line 342: warning: undeclared name: Asset (ineffassign)

misspell93%

Misspell Finds commonly misspelled English words