Preparing report...

Report for github.com/hacdias/caddy-hugo

A+    Excellent!    Found 34 issues across 95 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo95%

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.


golint83%

Golint is a linter for Go source code.

    • caddy-hugo/img/service.go
    • Line 1: warning: package comment should be of the form "Package img ..." (golint)
    • Line 22: warning: comment on exported type Service should be of the form "Service ..." (with optional leading article) (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 62: warning: comment on exported type Quality should be of the form "Quality ..." (with optional leading article) (golint)
    • Line 84: warning: comment on exported type ResizeMode should be of the form "ResizeMode ..." (with optional leading article) (golint)
    • Line 92: warning: exported method Service.FormatFromExtension should have comment or be unexported (golint)
    • Line 118: warning: exported type Option should have comment or be unexported (golint)
    • Line 120: warning: exported function WithFormat should have comment or be unexported (golint)
    • Line 126: warning: exported function WithMode should have comment or be unexported (golint)
    • Line 132: warning: exported function WithQuality should have comment or be unexported (golint)
    • Line 138: warning: exported method Service.Resize should have comment or be unexported (golint)
    • caddy-hugo/http/auth.go
    • Line 19: warning: exported const TokenExpirationTime should have comment (or a comment on this block) or be unexported (golint)
    • caddy-hugo/files/utils.go
    • Line 53: warning: exported function IsNamedPipe should have comment or be unexported (golint)
    • Line 57: warning: exported function IsSymlink should have comment or be unexported (golint)
    • caddy-hugo/diskcache/file_cache.go
    • Line 17: warning: exported type FileCache should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method FileCache.Store should have comment or be unexported (golint)
    • Line 51: warning: exported method FileCache.Load should have comment or be unexported (golint)
    • Line 65: warning: exported method FileCache.Delete should have comment or be unexported (golint)
    • caddy-hugo/diskcache/noop_cache.go
    • Line 7: warning: exported type NoOp should have comment or be unexported (golint)
    • Line 10: warning: exported function NewNoOp should have comment or be unexported (golint)
    • Line 14: warning: exported method NoOp.Store should have comment or be unexported (golint)
    • Line 18: warning: exported method NoOp.Load should have comment or be unexported (golint)
    • Line 22: warning: exported method NoOp.Delete should have comment or be unexported (golint)
    • caddy-hugo/http/preview.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 17: warning: comment on exported type PreviewSize should be of the form "PreviewSize ..." (with optional leading article) (golint)
    • Line 25: warning: exported type ImgService should have comment or be unexported (golint)
    • Line 30: warning: exported type FileCache should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • caddy-hugo/http/resource.go
    • Line 284: warning: undeclared name: PreviewSizeNames (ineffassign)
    • Line 285: warning: undeclared name: ParsePreviewSize (ineffassign)
    • Line 284: warning: undeclared name: PreviewSizeNames (ineffassign)
    • Line 285: warning: undeclared name: ParsePreviewSize (ineffassign)
    • caddy-hugo/img/service.go
    • Line 47: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 49: warning: undeclared name: FormatPng (ineffassign)
    • Line 51: warning: undeclared name: FormatGif (ineffassign)
    • Line 53: warning: undeclared name: FormatTiff (ineffassign)
    • Line 55: warning: undeclared name: FormatBmp (ineffassign)
    • Line 73: warning: undeclared name: QualityHigh (ineffassign)
    • Line 75: warning: undeclared name: QualityMedium (ineffassign)
    • Line 77: warning: undeclared name: QualityLow (ineffassign)
    • Line 99: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 101: warning: undeclared name: FormatPng (ineffassign)
    • Line 103: warning: undeclared name: FormatGif (ineffassign)
    • Line 105: warning: undeclared name: FormatTiff (ineffassign)
    • Line 107: warning: undeclared name: FormatBmp (ineffassign)
    • Line 151: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 152: warning: undeclared name: QualityMedium (ineffassign)
    • Line 158: warning: undeclared name: QualityLow (ineffassign)
    • Line 158: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 175: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 177: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 195: warning: undeclared name: ParseFormat (ineffassign)
    • Line 47: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 49: warning: undeclared name: FormatPng (ineffassign)
    • Line 51: warning: undeclared name: FormatGif (ineffassign)
    • Line 53: warning: undeclared name: FormatTiff (ineffassign)
    • Line 55: warning: undeclared name: FormatBmp (ineffassign)
    • Line 73: warning: undeclared name: QualityHigh (ineffassign)
    • Line 75: warning: undeclared name: QualityMedium (ineffassign)
    • Line 77: warning: undeclared name: QualityLow (ineffassign)
    • Line 99: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 101: warning: undeclared name: FormatPng (ineffassign)
    • Line 103: warning: undeclared name: FormatGif (ineffassign)
    • Line 105: warning: undeclared name: FormatTiff (ineffassign)
    • Line 107: warning: undeclared name: FormatBmp (ineffassign)
    • Line 151: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 152: warning: undeclared name: QualityMedium (ineffassign)
    • Line 158: warning: undeclared name: QualityLow (ineffassign)
    • Line 158: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 175: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 177: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 195: warning: undeclared name: ParseFormat (ineffassign)
    • caddy-hugo/img/service_test.go
    • Line 30: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 40: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 50: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 60: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 77: warning: undeclared name: FormatPng (ineffassign)
    • Line 80: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 87: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 90: warning: undeclared name: FormatPng (ineffassign)
    • Line 97: warning: undeclared name: FormatPng (ineffassign)
    • Line 100: warning: undeclared name: FormatGif (ineffassign)
    • Line 107: warning: undeclared name: FormatGif (ineffassign)
    • Line 110: warning: undeclared name: FormatTiff (ineffassign)
    • Line 117: warning: undeclared name: FormatTiff (ineffassign)
    • Line 120: warning: undeclared name: FormatBmp (ineffassign)
    • Line 127: warning: undeclared name: FormatBmp (ineffassign)
    • Line 137: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 140: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 150: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 160: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 170: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 180: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 180: warning: undeclared name: QualityHigh (ineffassign)
    • Line 190: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 190: warning: undeclared name: QualityMedium (ineffassign)
    • Line 200: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 200: warning: undeclared name: QualityLow (ineffassign)
    • Line 210: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 220: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 220: warning: undeclared name: QualityLow (ineffassign)
    • Line 230: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 230: warning: undeclared name: QualityLow (ineffassign)
    • Line 240: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 240: warning: undeclared name: QualityLow (ineffassign)
    • Line 250: warning: undeclared name: ResizeModeFill (ineffassign)
    • Line 250: warning: undeclared name: QualityMedium (ineffassign)
    • Line 260: warning: undeclared name: ResizeModeFit (ineffassign)
    • Line 312: warning: format.String undefined (type Format has no field or method String) (ineffassign)
    • Line 408: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 412: warning: undeclared name: FormatJpeg (ineffassign)
    • Line 416: warning: undeclared name: FormatPng (ineffassign)
    • Line 420: warning: undeclared name: FormatGif (ineffassign)
    • Line 424: warning: undeclared name: FormatTiff (ineffassign)
    • Line 428: warning: undeclared name: FormatBmp (ineffassign)
    • caddy-hugo/http/preview.go
    • Line 43: warning: undeclared name: ParsePreviewSize (ineffassign)
    • Line 76: warning: FormatGif not declared by package img (ineffassign)
    • Line 123: warning: undeclared name: PreviewSizeBig (ineffassign)
    • Line 126: warning: ResizeModeFit not declared by package img (ineffassign)
    • Line 126: warning: QualityMedium not declared by package img (ineffassign)
    • Line 127: warning: undeclared name: PreviewSizeThumb (ineffassign)
    • Line 130: warning: ResizeModeFill not declared by package img (ineffassign)
    • Line 130: warning: QualityLow not declared by package img (ineffassign)
    • Line 130: warning: FormatJpeg not declared by package img (ineffassign)
    • Line 43: warning: undeclared name: ParsePreviewSize (ineffassign)
    • Line 76: warning: FormatGif not declared by package img (ineffassign)
    • Line 123: warning: undeclared name: PreviewSizeBig (ineffassign)
    • Line 126: warning: ResizeModeFit not declared by package img (ineffassign)
    • Line 126: warning: QualityMedium not declared by package img (ineffassign)
    • Line 127: warning: undeclared name: PreviewSizeThumb (ineffassign)
    • Line 130: warning: ResizeModeFill not declared by package img (ineffassign)
    • Line 130: warning: QualityLow not declared by package img (ineffassign)
    • Line 130: warning: FormatJpeg not declared by package img (ineffassign)

misspell83%

Misspell Finds commonly misspelled English words

    • caddy-hugo/auth/storage.go
    • Line 10: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 11: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 26: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 31: warning: "Auther" is a misspelling of "Author" (misspell)
    • caddy-hugo/cmd/config.go
    • Line 69: warning: "auther" is a misspelling of "author" (misspell)
    • Line 81: warning: "auther" is a misspelling of "author" (misspell)
    • Line 85: warning: "auther" is a misspelling of "author" (misspell)
    • Line 113: warning: "auther" is a misspelling of "author" (misspell)
    • Line 116: warning: "auther" is a misspelling of "author" (misspell)
    • Line 120: warning: "auther" is a misspelling of "author" (misspell)
    • Line 123: warning: "auther" is a misspelling of "author" (misspell)
    • Line 164: warning: "auther" is a misspelling of "author" (misspell)
    • caddy-hugo/cmd/config_import.go
    • Line 22: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 22: warning: "auther" is a misspelling of "author" (misspell)
    • Line 65: warning: "auther" is a misspelling of "author" (misspell)
    • Line 68: warning: "auther" is a misspelling of "author" (misspell)
    • Line 70: warning: "auther" is a misspelling of "author" (misspell)
    • Line 72: warning: "auther" is a misspelling of "author" (misspell)
    • Line 77: warning: "auther" is a misspelling of "author" (misspell)
    • Line 80: warning: "auther" is a misspelling of "author" (misspell)
    • Line 86: warning: "auther" is a misspelling of "author" (misspell)
    • Line 89: warning: "auther" is a misspelling of "author" (misspell)
    • Line 91: warning: "auther" is a misspelling of "author" (misspell)
    • caddy-hugo/auth/auth.go
    • Line 9: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 10: warning: "Auther" is a misspelling of "Author" (misspell)
    • Line 13: warning: "auther" is a misspelling of "author" (misspell)
    • caddy-hugo/cmd/config_set.go
    • Line 64: warning: "auther" is a misspelling of "author" (misspell)
    • Line 68: warning: "auther" is a misspelling of "author" (misspell)
    • Line 68: warning: "auther" is a misspelling of "author" (misspell)
    • Line 70: warning: "auther" is a misspelling of "author" (misspell)
    • Line 76: warning: "auther" is a misspelling of "author" (misspell)
    • caddy-hugo/storage/bolt/auth.go
    • Line 16: warning: "auther" is a misspelling of "author" (misspell)
    • Line 20: warning: "auther" is a misspelling of "author" (misspell)
    • Line 22: warning: "auther" is a misspelling of "author" (misspell)
    • Line 24: warning: "auther" is a misspelling of "author" (misspell)
    • Line 29: warning: "auther" is a misspelling of "author" (misspell)
    • Line 29: warning: "auther" is a misspelling of "author" (misspell)
    • Line 29: warning: "auther" is a misspelling of "author" (misspell)
    • Line 33: warning: "auther" is a misspelling of "author" (misspell)