Preparing report...

Report for github.com/dsoprea/go-png-image-structure

A    Great!    Found 13 issues across 16 files

Tweet

gofmt62%

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!


gocyclo100%

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.

No problems detected. Good job!


golint62%

Golint is a linter for Go source code.

    • go-png-image-structure/chunk_decoder.go
    • Line 12: warning: exported type ChunkDecoder should have comment or be unexported (golint)
    • Line 16: warning: exported function NewChunkDecoder should have comment or be unexported (golint)
    • Line 20: warning: exported method ChunkDecoder.Decode should have comment or be unexported (golint)
    • Line 41: warning: exported type ChunkIHDR should have comment or be unexported (golint)
    • go-png-image-structure/png.go
    • Line 18: warning: exported var PngSignature should have comment or be unexported (golint)
    • Line 24: warning: exported var ErrNotPng should have comment or be unexported (golint)
    • Line 34: warning: exported function NewChunkSlice should have comment or be unexported (golint)
    • Line 46: warning: exported function NewPngChunkSlice should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method ChunkSlice.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 214: warning: exported method PngSplitter.Chunks should have comment or be unexported (golint)
    • Line 218: warning: exported method PngSplitter.DoCheckCrc should have comment or be unexported (golint)
    • Line 222: warning: exported method PngSplitter.CrcErrors should have comment or be unexported (golint)
    • Line 226: warning: exported function NewPngSplitter should have comment or be unexported (golint)
    • Line 256: warning: exported method Chunk.UpdateCrc32 should have comment or be unexported (golint)
    • Line 260: warning: exported method Chunk.CheckCrc32 should have comment or be unexported (golint)
    • Line 298: warning: comment on exported method Chunk.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 333: warning: don't use underscores in Go names; var len_ should be len (golint)
    • Line 365: warning: don't use underscores in Go names; var len_ should be len (golint)
    • Line 371: warning: don't use underscores in Go names; var type_ should be type (golint)
    • go-png-image-structure/utility.go
    • Line 10: warning: exported function DumpBytes should have comment or be unexported (golint)
    • Line 19: warning: exported function DumpBytesClause should have comment or be unexported (golint)
    • Line 35: warning: exported function DumpBytesToString should have comment or be unexported (golint)
    • Line 51: warning: exported function DumpBytesClauseToString should have comment or be unexported (golint)
    • go-png-image-structure/v2/chunk_decoder.go
    • Line 12: warning: exported type ChunkDecoder should have comment or be unexported (golint)
    • Line 15: warning: exported function NewChunkDecoder should have comment or be unexported (golint)
    • Line 19: warning: exported method ChunkDecoder.Decode should have comment or be unexported (golint)
    • Line 39: warning: exported type ChunkIHDR should have comment or be unexported (golint)
    • go-png-image-structure/v2/png.go
    • Line 19: warning: exported var PngSignature should have comment or be unexported (golint)
    • Line 25: warning: exported var ErrNotPng should have comment or be unexported (golint)
    • Line 34: warning: exported function NewChunkSlice should have comment or be unexported (golint)
    • Line 46: warning: exported function NewPngChunkSlice should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method ChunkSlice.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 216: warning: exported method PngSplitter.Chunks should have comment or be unexported (golint)
    • Line 220: warning: exported method PngSplitter.DoCheckCrc should have comment or be unexported (golint)
    • Line 224: warning: exported method PngSplitter.CrcErrors should have comment or be unexported (golint)
    • Line 228: warning: exported function NewPngSplitter should have comment or be unexported (golint)
    • Line 258: warning: exported method Chunk.UpdateCrc32 should have comment or be unexported (golint)
    • Line 262: warning: exported method Chunk.CheckCrc32 should have comment or be unexported (golint)
    • Line 300: warning: comment on exported method Chunk.WriteTo should be of the form "WriteTo ..." (golint)
    • Line 335: warning: don't use underscores in Go names; var len_ should be len (golint)
    • Line 367: warning: don't use underscores in Go names; var len_ should be len (golint)
    • Line 373: warning: don't use underscores in Go names; var type_ should be type (golint)
    • go-png-image-structure/v2/utility.go
    • Line 10: warning: exported function DumpBytes should have comment or be unexported (golint)
    • Line 19: warning: exported function DumpBytesClause should have comment or be unexported (golint)
    • Line 35: warning: exported function DumpBytesToString should have comment or be unexported (golint)
    • Line 51: warning: exported function DumpBytesClauseToString should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.

    • go-png-image-structure/png_test.go
    • Line 50: warning: ineffectual assignment to data (ineffassign)
    • Line 89: warning: ineffectual assignment to data (ineffassign)
    • Line 398: warning: ineffectual assignment to rootIfd (ineffassign)
    • Line 416: warning: ineffectual assignment to exifChunk (ineffassign)
    • Line 432: warning: ineffectual assignment to index (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!