Preparing report...

Report for github.com/linehk/go-algorithms

A+    Excellent!    Found 96 issues across 114 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!


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!


golint15%

Golint is a linter for Go source code.

    • go-algorithms/algorithm/sort/comparisonSort/mergeSort/mergeSort.go
    • Line 1: warning: don't use MixedCaps in package name; mergeSort should be mergesort (golint)
    • Line 3: warning: exported function MergeSort should have comment or be unexported (golint)
    • Line 42: warning: exported function IndexMergeSort should have comment or be unexported (golint)
    • Line 87: warning: exported function BottomUpMergeSort should have comment or be unexported (golint)
    • Line 102: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-algorithms/dataStructure/graph/adjacencyMatrix/adjacencyMatrix.go
    • Line 1: warning: don't use MixedCaps in package name; adjacencyMatrix should be adjacencymatrix (golint)
    • Line 3: warning: exported type UndirectedGraph should have comment or be unexported (golint)
    • Line 9: warning: exported function NewGraph should have comment or be unexported (golint)
    • Line 20: warning: exported type Edge should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function NewEdge should be of the form "NewEdge ..." (golint)
    • Line 35: warning: exported method UndirectedGraph.V should have comment or be unexported (golint)
    • Line 39: warning: exported method UndirectedGraph.E should have comment or be unexported (golint)
    • Line 43: warning: exported method UndirectedGraph.AddEdge should have comment or be unexported (golint)
    • Line 49: warning: exported method UndirectedGraph.Degree should have comment or be unexported (golint)
    • Line 59: warning: exported method UndirectedGraph.Adj should have comment or be unexported (golint)
    • Line 69: warning: exported type DirectedGraph should have comment or be unexported (golint)
    • Line 76: warning: exported function NewDigraph should have comment or be unexported (golint)
    • Line 88: warning: exported method DirectedGraph.V should have comment or be unexported (golint)
    • Line 92: warning: exported method DirectedGraph.E should have comment or be unexported (golint)
    • Line 96: warning: exported method DirectedGraph.AddEdge should have comment or be unexported (golint)
    • Line 102: warning: exported method DirectedGraph.Adj should have comment or be unexported (golint)
    • Line 112: warning: exported method DirectedGraph.OutDegree should have comment or be unexported (golint)
    • Line 122: warning: exported method DirectedGraph.InDegree should have comment or be unexported (golint)
    • Line 126: warning: exported method DirectedGraph.Reverse should have comment or be unexported (golint)
    • go-algorithms/dataStructure/array/array.go
    • Line 1: warning: package comment should be of the form "Package array ..." (golint)
    • Line 8: warning: exported type Array should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 18: warning: exported method Array.Init should have comment or be unexported (golint)
    • go-algorithms/dataStructure/tree/redBlackTree/redBlackTree.go
    • Line 1: warning: don't use MixedCaps in package name; redBlackTree should be redblacktree (golint)
    • Line 7: warning: exported const RED should have comment or be unexported (golint)
    • Line 8: warning: exported const BLACK should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 325: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 340: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 353: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 373: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 386: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 406: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 458: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-algorithms/dataStructure/tree/AVLTree/AVLTree.go
    • Line 1: warning: don't use MixedCaps in package name; AVLTree should be avltree (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 232: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 247: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 275: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 295: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 308: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 328: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 380: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-algorithms/algorithm/search/sequence/binarySearch/binarySearch.go
    • Line 1: warning: don't use MixedCaps in package name; binarySearch should be binarysearch (golint)
    • Line 3: warning: exported function BinarySearch should have comment or be unexported (golint)
    • Line 19: warning: exported function BinarySearchIndex should have comment or be unexported (golint)
    • Line 35: warning: exported function BinarySearchFirst should have comment or be unexported (golint)
    • Line 49: warning: exported function RecursiveBinarySearch should have comment or be unexported (golint)
    • go-algorithms/dataStructure/symbolTable/binarySearch/binarySearch.go
    • Line 1: warning: don't use MixedCaps in package name; binarySearch should be binarysearch (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 161: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 183: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-algorithms/dataStructure/tree/binarySearchTree/binarySearchTree.go
    • Line 1: warning: don't use MixedCaps in package name; binarySearchTree should be binarysearchtree (golint)
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 199: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 228: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 248: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 283: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 344: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!