Preparing report...

Report for github.com/anakin/golang-leetcode

A    Great!    Found 100 issues across 285 files

Tweet

gofmt97%

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!


golint67%

Golint is a linter for Go source code.

    • golang-leetcode/155. Min Stack.go
    • Line 5: warning: comment on exported type MinStack should be of the form "MinStack ..." (with optional leading article) (golint)
    • Line 12: warning: comment on exported function Constructor should be of the form "Constructor ..." (golint)
    • Line 22: warning: exported method MinStack.Push should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: exported method MinStack.Pop should have comment or be unexported (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 41: warning: exported method MinStack.Top should have comment or be unexported (golint)
    • Line 41: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: exported method MinStack.GetMin should have comment or be unexported (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/304. Range Sum Query 2D - Immutable.go
    • Line 3: warning: exported type NumMatrix should have comment or be unexported (golint)
    • Line 12: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 31: warning: exported method NumMatrix.SumRegion should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/20. [E]Valid Parentheses.go
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golang-leetcode/303. Range Sum Query - Immutable.go
    • Line 3: warning: exported type NumArray should have comment or be unexported (golint)
    • Line 7: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 22: warning: exported method NumArray.SumRange should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golang-leetcode/382. Linked List Random Node.go
    • Line 5: warning: exported type ListNode should have comment or be unexported (golint)
    • Line 10: warning: exported type Solution should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function Constructor should be of the form "Constructor ..." (golint)
    • Line 24: warning: comment on exported method Solution.GetRandom should be of the form "GetRandom ..." (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golang-leetcode/706. Design HashMap.go
    • Line 3: warning: comment on exported type MyHashMap should be of the form "MyHashMap ..." (with optional leading article) (golint)
    • Line 8: warning: comment on exported function Constructor should be of the form "Constructor ..." (golint)
    • Line 19: warning: comment on exported method MyHashMap.Put should be of the form "Put ..." (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 24: warning: comment on exported method MyHashMap.Get should be of the form "Get ..." (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: comment on exported method MyHashMap.Remove should be of the form "Remove ..." (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/307. Range Sum Query - Mutable.go
    • Line 3: warning: exported type NumArray should have comment or be unexported (golint)
    • Line 7: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 22: warning: exported method NumArray.Update should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: exported method NumArray.SumRange should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • golang-leetcode/729. My Calendar I.go
    • Line 3: warning: comment on exported type MyCalendar should be of the form "MyCalendar ..." (with optional leading article) (golint)
    • Line 10: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 17: warning: exported method MyCalendar.Book should have comment or be unexported (golint)
    • Line 17: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/705. Design HashSet.go
    • Line 3: warning: comment on exported type MyHashSet should be of the form "MyHashSet ..." (with optional leading article) (golint)
    • Line 10: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 18: warning: exported method MyHashSet.Add should have comment or be unexported (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 22: warning: exported method MyHashSet.Remove should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: comment on exported method MyHashSet.Contains should be of the form "Contains ..." (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/435. Non-overlapping Intervals.go
    • Line 9: warning: exported type Interval should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/384. Shuffle an Array.go
    • Line 21: warning: exported type Solution should have comment or be unexported (golint)
    • Line 26: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 31: warning: comment on exported method Solution.Reset should be of the form "Reset ..." (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 37: warning: comment on exported method Solution.Shuffle should be of the form "Shuffle ..." (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/173. Binary Search Tree Iterator.go
    • Line 3: warning: exported type TreeNode should have comment or be unexported (golint)
    • Line 14: warning: exported type BSTIterator should have comment or be unexported (golint)
    • Line 18: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method BSTIterator.Next should be of the form "Next ..." (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 37: warning: comment on exported method BSTIterator.HasNext should be of the form "HasNext ..." (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • golang-leetcode/677. Map Sum Pairs.go
    • Line 3: warning: comment on exported type Trie should be of the form "Trie ..." (with optional leading article) (golint)
    • Line 13: warning: exported method Trie.Insert should have comment or be unexported (golint)
    • Line 29: warning: exported method Trie.Find should have comment or be unexported (golint)
    • Line 43: warning: exported type MapSum should have comment or be unexported (golint)
    • Line 47: warning: exported function Constructor should have comment or be unexported (golint)
    • Line 50: warning: exported method MapSum.Insert should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: exported method MapSum.Sum should have comment or be unexported (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)

gocyclo99%

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.


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


license0%

Checks whether your project has a LICENSE file.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!