Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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.
Golint is a linter for Go source code.
-
Data-Structures-and-Algorithms/stack/link_stack.go
- Line 10: warning: exported function NewLinkStack should have comment or be unexported (golint)
- Line 14: warning: exported method LinkStack.Push should have comment or be unexported (golint)
- Line 18: warning: exported method LinkStack.Pop should have comment or be unexported (golint)
- Line 22: warning: exported method LinkStack.Peek should have comment or be unexported (golint)
- Line 26: warning: exported method LinkStack.Clear should have comment or be unexported (golint)
- Line 30: warning: exported method LinkStack.Length should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/queue/static_queue.go
- Line 3: warning: exported type StaticQueue should have comment or be unexported (golint)
- Line 11: warning: exported function NewStaticQueue should have comment or be unexported (golint)
- Line 18: warning: exported method StaticQueue.Push should have comment or be unexported (golint)
- Line 30: warning: exported method StaticQueue.Pop should have comment or be unexported (golint)
- Line 42: warning: exported method StaticQueue.Clear should have comment or be unexported (golint)
- Line 48: warning: exported method StaticQueue.Capacity should have comment or be unexported (golint)
- Line 52: warning: exported method StaticQueue.Length should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/hashtable/hashtable.go
- Line 21: warning: exported function New should have comment or be unexported (golint)
- Line 51: warning: exported method HashTable.Add should have comment or be unexported (golint)
- Line 69: warning: exported method HashTable.Get should have comment or be unexported (golint)
- Line 81: warning: exported method HashTable.Set should have comment or be unexported (golint)
- Line 94: warning: exported method HashTable.Del 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)
- Line 116: warning: exported method HashTable.Length should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/list/link_list.go
- Line 3: warning: exported type Node should have comment or be unexported (golint)
- Line 9: warning: exported type LinkList should have comment or be unexported (golint)
- Line 15: warning: exported method LinkList.PushBack should have comment or be unexported (golint)
- Line 30: warning: exported method LinkList.PushFront should have comment or be unexported (golint)
- Line 45: warning: exported method LinkList.PopBack should have comment or be unexported (golint)
- Line 65: warning: exported method LinkList.PopFront should have comment or be unexported (golint)
- Line 85: warning: exported method LinkList.Find should have comment or be unexported (golint)
- Line 103: warning: exported method LinkList.Insert should have comment or be unexported (golint)
- Line 140: warning: exported method LinkList.Get should have comment or be unexported (golint)
- Line 162: warning: exported method LinkList.Length should have comment or be unexported (golint)
- Line 166: warning: exported method LinkList.Clear should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/tree/binary_tree.go
- Line 9: warning: exported type Element should have comment or be unexported (golint)
- Line 14: warning: exported type Node should have comment or be unexported (golint)
- Line 21: warning: exported type BinaryTree should have comment or be unexported (golint)
- Line 25: warning: exported function NewBinaryTree should have comment or be unexported (golint)
- Line 29: warning: exported method BinaryTree.Insert should have comment or be unexported (golint)
- Line 61: warning: exported method BinaryTree.Delete should have comment or be unexported (golint)
- Line 120: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 128: warning: exported method BinaryTree.Min should have comment or be unexported (golint)
- Line 141: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 150: warning: exported method BinaryTree.Max should have comment or be unexported (golint)
- Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 207: warning: exported method BinaryTree.LevelTraversal should have comment or be unexported (golint)
- Line 231: warning: exported method BinaryTree.PreOrderTraversal should have comment or be unexported (golint)
- Line 239: warning: exported method BinaryTree.InOrderTraversal should have comment or be unexported (golint)
- Line 247: warning: exported method BinaryTree.PostOrderTraversal should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/stack/static_stack.go
- Line 9: warning: exported function NewStaticStack should have comment or be unexported (golint)
- Line 15: warning: exported method StaticStack.Push should have comment or be unexported (golint)
- Line 25: warning: exported method StaticStack.Pop should have comment or be unexported (golint)
- Line 35: warning: exported method StaticStack.Peek should have comment or be unexported (golint)
- Line 42: warning: exported method StaticStack.Clear should have comment or be unexported (golint)
- Line 46: warning: exported method StaticStack.Capacity should have comment or be unexported (golint)
- Line 50: warning: exported method StaticStack.Length should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/sort/helper.go
- Line 3: warning: exported type IntSlice should have comment or be unexported (golint)
- Line 9: warning: exported method IntSlice.HeapSort should have comment or be unexported (golint)
- Line 11: warning: exported type Float64Slice should have comment or be unexported (golint)
- Line 22: warning: exported method Float64Slice.HeapSort should have comment or be unexported (golint)
- Line 24: warning: exported type StringSlice should have comment or be unexported (golint)
- Line 30: warning: exported method StringSlice.HeapSort should have comment or be unexported (golint)
-
Data-Structures-and-Algorithms/queue/link_queue.go
- Line 5: warning: exported type LinkQueue should have comment or be unexported (golint)
- Line 9: warning: exported function NewLinkQueue should have comment or be unexported (golint)
- Line 13: warning: exported method LinkQueue.Push should have comment or be unexported (golint)
- Line 17: warning: exported method LinkQueue.Pop should have comment or be unexported (golint)
- Line 21: warning: exported method LinkQueue.Clear should have comment or be unexported (golint)
- Line 25: warning: exported method LinkQueue.Length should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!