Preparing report...

Report for github.com/siongui/go-succinct-data-structure-trie

A+    Excellent!    Found 12 issues across 17 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!


gocyclo94%

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.


golint29%

Golint is a linter for Go source code.

    • go-succinct-data-structure-trie/base64.go
    • Line 6: warning: exported var BASE64 should have comment or be unexported (golint)
    • Line 8: warning: comment on exported var W should be of the form "W ..." (golint)
    • Line 14: warning: comment on exported function CHR should be of the form "CHR ..." (golint)
    • Line 22: warning: comment on exported var BASE64_CACHE should be of the form "BASE64_CACHE ..." (golint)
    • Line 37: warning: exported function ORD should have comment or be unexported (golint)
    • go-succinct-data-structure-trie/bitstring.go
    • Line 3: warning: comment on exported type BitString should be of the form "BitString ..." (with optional leading article) (golint)
    • Line 13: warning: exported var MaskTop should have comment or be unexported (golint)
    • Line 17: warning: exported var BitsInByte should have comment or be unexported (golint)
    • Line 31: warning: exported method BitString.Init should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method BitString.GetData should be of the form "GetData ..." (golint)
    • Line 43: warning: comment on exported method BitString.Get should be of the form "Get ..." (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 81: warning: comment on exported method BitString.Count should be of the form "Count ..." (golint)
    • Line 97: warning: comment on exported method BitString.Rank should be of the form "Rank ..." (golint)
    • go-succinct-data-structure-trie/reference/Bits.go
    • Line 1: warning: package comment should be of the form "Package Bits ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 49: warning: don't use MixedCaps in package name; Bits should be bits (golint)
    • Line 59: warning: exported var BASE64 should have comment or be unexported (golint)
    • Line 61: warning: comment on exported var W should be of the form "W ..." (golint)
    • Line 67: warning: comment on exported function CHR should be of the form "CHR ..." (golint)
    • Line 75: warning: comment on exported var BASE64_CACHE should be of the form "BASE64_CACHE ..." (golint)
    • Line 90: warning: exported function ORD should have comment or be unexported (golint)
    • Line 95: warning: comment on exported var L1 should be of the form "L1 ..." (golint)
    • Line 99: warning: exported var L2 should have comment or be unexported (golint)
    • Line 101: warning: comment on exported type BitWriter should be of the form "BitWriter ..." (with optional leading article) (golint)
    • Line 127: warning: comment on exported method BitWriter.GetData should be of the form "GetData ..." (golint)
    • Line 151: warning: comment on exported method BitWriter.GetDebugString should be of the form "GetDebugString ..." (golint)
    • Line 174: warning: comment on exported type BitString should be of the form "BitString ..." (with optional leading article) (golint)
    • Line 184: warning: exported var MaskTop should have comment or be unexported (golint)
    • Line 188: warning: exported var BitsInByte should have comment or be unexported (golint)
    • Line 202: warning: exported method BitString.Init should have comment or be unexported (golint)
    • Line 207: warning: comment on exported method BitString.GetData should be of the form "GetData ..." (golint)
    • Line 214: warning: comment on exported method BitString.Get should be of the form "Get ..." (golint)
    • Line 227: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 252: warning: comment on exported method BitString.Count should be of the form "Count ..." (golint)
    • Line 268: warning: comment on exported method BitString.Rank should be of the form "Rank ..." (golint)
    • Line 286: warning: comment on exported type RankDirectory should be of the form "RankDirectory ..." (with optional leading article) (golint)
    • Line 302: warning: comment on exported function CreateRankDirectory should be of the form "CreateRankDirectory ..." (golint)
    • Line 345: warning: exported method RankDirectory.Init should have comment or be unexported (golint)
    • Line 356: warning: comment on exported method RankDirectory.GetData should be of the form "GetData ..." (golint)
    • Line 363: warning: comment on exported method RankDirectory.Rank should be of the form "Rank ..." (golint)
    • Line 393: warning: comment on exported method RankDirectory.Select should be of the form "Select ..." (golint)
    • Line 421: warning: comment on exported type TrieNode should be of the form "TrieNode ..." (with optional leading article) (golint)
    • Line 431: warning: exported type Trie should have comment or be unexported (golint)
    • Line 438: warning: exported method Trie.Init should have comment or be unexported (golint)
    • Line 448: warning: comment on exported method Trie.GetNodeCount should be of the form "GetNodeCount ..." (golint)
    • Line 455: warning: comment on exported method Trie.Insert should be of the form "Insert ..." (golint)
    • Line 507: warning: comment on exported method Trie.Apply should be of the form "Apply ..." (golint)
    • Line 523: warning: comment on exported method Trie.Encode should be of the form "Encode ..." (golint)
    • Line 553: warning: comment on exported type FrozenTrieNode should be of the form "FrozenTrieNode ..." (with optional leading article) (golint)
    • Line 565: warning: comment on exported method FrozenTrieNode.GetChildCount should be of the form "GetChildCount ..." (golint)
    • Line 572: warning: comment on exported method FrozenTrieNode.GetChild should be of the form "GetChild ..." (golint)
    • Line 582: warning: comment on exported type FrozenTrie should be of the form "FrozenTrie ..." (with optional leading article) (golint)
    • Line 598: warning: exported method FrozenTrie.Init should have comment or be unexported (golint)
    • Line 607: warning: comment on exported method FrozenTrie.GetNodeByIndex should be of the form "GetNodeByIndex ..." (golint)
    • Line 631: warning: comment on exported method FrozenTrie.GetRoot should be of the form "GetRoot ..." (golint)
    • Line 639: warning: comment on exported method FrozenTrie.Lookup should be of the form "Lookup ..." (golint)
    • go-succinct-data-structure-trie/rankdirectory.go
    • Line 5: warning: comment on exported var L1 should be of the form "L1 ..." (golint)
    • Line 9: warning: exported var L2 should have comment or be unexported (golint)
    • Line 11: warning: comment on exported type RankDirectory should be of the form "RankDirectory ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported function CreateRankDirectory should be of the form "CreateRankDirectory ..." (golint)
    • Line 70: warning: exported method RankDirectory.Init should have comment or be unexported (golint)
    • Line 81: warning: comment on exported method RankDirectory.GetData should be of the form "GetData ..." (golint)
    • Line 88: warning: comment on exported method RankDirectory.Rank should be of the form "Rank ..." (golint)
    • Line 118: warning: comment on exported method RankDirectory.Select should be of the form "Select ..." (golint)
    • go-succinct-data-structure-trie/trie.go
    • Line 1: warning: package comment should be of the form "Package bits ..." (golint)
    • Line 10: warning: comment on exported type TrieNode should be of the form "TrieNode ..." (with optional leading article) (golint)
    • Line 20: warning: exported type Trie should have comment or be unexported (golint)
    • Line 27: warning: exported method Trie.Init should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method Trie.GetNodeCount should be of the form "GetNodeCount ..." (golint)
    • Line 44: warning: comment on exported method Trie.Insert should be of the form "Insert ..." (golint)
    • Line 101: warning: comment on exported method Trie.Apply should be of the form "Apply ..." (golint)
    • Line 117: warning: comment on exported method Trie.Encode should be of the form "Encode ..." (golint)
    • go-succinct-data-structure-trie/bitwriter.go
    • Line 5: warning: comment on exported type BitWriter should be of the form "BitWriter ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported method BitWriter.GetData should be of the form "GetData ..." (golint)
    • Line 59: warning: comment on exported method BitWriter.GetDebugString should be of the form "GetDebugString ..." (golint)
    • go-succinct-data-structure-trie/frozentrie.go
    • Line 5: warning: comment on exported type FrozenTrieNode should be of the form "FrozenTrieNode ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported method FrozenTrieNode.GetChildCount should be of the form "GetChildCount ..." (golint)
    • Line 24: warning: comment on exported method FrozenTrieNode.GetChild should be of the form "GetChild ..." (golint)
    • Line 34: warning: comment on exported type FrozenTrie should be of the form "FrozenTrie ..." (with optional leading article) (golint)
    • Line 50: warning: exported method FrozenTrie.Init should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method FrozenTrie.GetNodeByIndex should be of the form "GetNodeByIndex ..." (golint)
    • Line 86: warning: comment on exported method FrozenTrie.GetRoot should be of the form "GetRoot ..." (golint)
    • Line 94: warning: comment on exported method FrozenTrie.Lookup should be of the form "Lookup ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!