Preparing report...

Report for github.com/go-compression/raisin

A+    Excellent!    Found 9 issues across 20 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!


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.


golint65%

Golint is a linter for Go source code.

    • raisin/compressor/arithmetic_logical/arithmetic.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 39: warning: receiver name b should be consistent with previous receiver name bits for bitString (golint)
    • Line 58: warning: exported function Range should have comment or be unexported (golint)
    • Line 72: warning: exported function Compress should have comment or be unexported (golint)
    • Line 97: warning: exported function Decompress should have comment or be unexported (golint)
    • Line 333: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 360: warning: exported type Writer should have comment or be unexported (golint)
    • Line 364: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 376: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 380: warning: exported type Reader should have comment or be unexported (golint)
    • Line 387: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 416: warning: exported method Reader.Close should have comment or be unexported (golint)
    • raisin/compressor/arithmetic_big/arithmetic_big.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 15: warning: exported function Compress should have comment or be unexported (golint)
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 116: warning: exported function Decompress should have comment or be unexported (golint)
    • Line 132: warning: exported type Writer should have comment or be unexported (golint)
    • Line 136: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 148: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 152: warning: exported type Reader should have comment or be unexported (golint)
    • Line 159: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 188: warning: exported method Reader.Close should have comment or be unexported (golint)
    • raisin/compressor/mcc/mcc.go
    • Line 15: warning: exported type Token should have comment or be unexported (golint)
    • Line 18: warning: exported const Read should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type State should have comment or be unexported (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 161: warning: don't use underscores in Go names; const highest_order_for_up should be highestOrderForUp (golint)
    • Line 410: warning: exported function Compress should have comment or be unexported (golint)
    • Line 428: warning: exported function Decompress should have comment or be unexported (golint)
    • Line 444: warning: exported type Writer should have comment or be unexported (golint)
    • Line 448: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 460: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 464: warning: exported type Reader should have comment or be unexported (golint)
    • Line 471: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 500: warning: exported method Reader.Close should have comment or be unexported (golint)
    • raisin/compressor/huffman/huffman.go
    • Line 14: warning: exported type HuffmanTree should have comment or be unexported (golint)
    • Line 18: warning: exported type HuffmanLeaf should have comment or be unexported (golint)
    • Line 23: warning: exported type HuffmanNode should have comment or be unexported (golint)
    • Line 28: warning: exported method HuffmanLeaf.Freq should have comment or be unexported (golint)
    • Line 28: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: exported method HuffmanNode.Freq should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 141: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 260: warning: don't use underscores in Go names; var file_content should be fileContent (golint)
    • Line 299: warning: exported function Compress should have comment or be unexported (golint)
    • Line 327: warning: exported function Decompress should have comment or be unexported (golint)
    • Line 368: warning: exported type Writer should have comment or be unexported (golint)
    • Line 372: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 384: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 388: warning: exported type Reader should have comment or be unexported (golint)
    • Line 395: warning: exported function NewReader should have comment or be unexported (golint)
    • raisin/compressor/arithmetic/bits.go
    • Line 32: warning: exported function PushBitsPending should have comment or be unexported (golint)
    • Line 76: warning: error should be the last type when returning multiple items (golint)
    • Line 76: warning: exported method BitSlice.AsByteSlice should have comment or be unexported (golint)
    • Line 97: warning: exported function FromByteSlice should have comment or be unexported (golint)
    • raisin/compressor/dmc/dmc.go
    • Line 17: warning: exported type MarkovChain should have comment or be unexported (golint)
    • Line 32: warning: exported function Compress should have comment or be unexported (golint)
    • Line 100: warning: exported function GetBitsFromChain should have comment or be unexported (golint)
    • Line 151: warning: exported function GetOutputFromBits should have comment or be unexported (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 182: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 196: warning: exported function SortNodesByOccurrences should have comment or be unexported (golint)
    • Line 227: warning: exported function GetIndexOfNodeWithValue should have comment or be unexported (golint)
    • Line 236: warning: exported function GetIndexOfNodeWithMoveUp should have comment or be unexported (golint)
    • Line 245: warning: exported function UpwardTravels should have comment or be unexported (golint)
    • Line 256: warning: exported function PrintMarkovChain should have comment or be unexported (golint)
    • Line 274: warning: exported function Decompress should have comment or be unexported (golint)
    • Line 294: warning: exported type Writer should have comment or be unexported (golint)
    • Line 298: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 310: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 314: warning: exported type Reader should have comment or be unexported (golint)
    • Line 321: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 350: warning: exported method Reader.Close should have comment or be unexported (golint)
    • raisin/compressor/lz/lzss.go
    • Line 15: warning: exported const Opening should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported const MinimumSizeOfReference should have comment or be unexported (golint)
    • Line 22: warning: exported type Reference should have comment or be unexported (golint)
    • Line 29: warning: exported type Writer should have comment or be unexported (golint)
    • Line 35: warning: exported const DefaultWindowSize should have comment or be unexported (golint)
    • Line 37: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 42: warning: exported function NewWriterLevel should have comment or be unexported (golint)
    • Line 59: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 63: warning: exported type Reader should have comment or be unexported (golint)
    • Line 98: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 104: warning: exported method Reader.Close should have comment or be unexported (golint)
    • Line 175: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 366: warning: exported const EncodedOpening should have comment or be unexported (golint)
    • Line 367: warning: exported const EscapeByte should have comment or be unexported (golint)
    • Line 369: warning: exported function EncodeOpeningSymbols should have comment or be unexported (golint)
    • Line 391: warning: exported function DecodeOpeningSymbols should have comment or be unexported (golint)
    • Line 408: warning: exported function FindSequential should have comment or be unexported (golint)
    • Line 418: warning: exported function FindReverseSlice should have comment or be unexported (golint)
    • Line 423: warning: exported function FindReverse should have comment or be unexported (golint)
    • Line 435: warning: exported function SortByteArray should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign85%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!