Preparing report...

Report for github.com/codefreezr/rosettacode-to-go

A+    Excellent!    Found 298 issues across 998 files

Tweet

gofmt82%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

    • rosettacode-to-go/tasks/Anagrams/anagrams-3.go
    • Line 1: expected 'package', found 'import':1::warning: file is not gofmted with -s (gofmt)
    • Line 8: illegal character U+0024 '$':1::warning: file is not gofmted with -s (gofmt)
    • Line 9: illegal character U+0024 '$':1::warning: file is not gofmted with -s (gofmt)
    • Line 10: illegal character U+0024 '$':1::warning: file is not gofmted with -s (gofmt)
    • rosettacode-to-go/tasks/Address-of-a-variable/address-of-a-variable-2.go
    • Line 1: expected 'package', found '==':1::warning: file is not gofmted with -s (gofmt)
    • Line 7: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 8: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: illegal character U+0023 '#':1::warning: file is not gofmted with -s (gofmt)
    • Line 28: illegal character U+0023 '#':1::warning: file is not gofmted with -s (gofmt)
    • Line 28: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • rosettacode-to-go/tasks/XML-Output/xml-output-2.go
    • Line 1: expected 'package', found '<':1::warning: file is not gofmted with -s (gofmt)
    • Line 2: illegal character U+0023 '#':1::warning: file is not gofmted with -s (gofmt)
    • Line 3: illegal character U+0023 '#':1::warning: file is not gofmted with -s (gofmt)
    • Line 3: illegal character U+0023 '#':1::warning: file is not gofmted with -s (gofmt)

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!


golint80%

Golint is a linter for Go source code.

    • rosettacode-to-go/tasks/Fibonacci-word/fibonacci-word.go
    • Line 22: warning: don't use underscores in Go names; const F_Word1 should be FWord1 (golint)
    • Line 22: warning: exported const F_Word1 should have comment or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; const F_Word2 should be FWord2 (golint)
    • Line 23: warning: exported const F_Word2 should have comment or be unexported (golint)
    • Line 25: warning: exported function FibonacciWord should have comment or be unexported (golint)
    • Line 33: warning: exported function FibonacciWordGen should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Four-bit-adder/four-bit-adder-2.go
    • Line 5: warning: comment on exported type Wire should be of the form "Wire ..." (with optional leading article) (golint)
    • Line 10: warning: exported function MkWire should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function Zero should be of the form "Zero ..." (golint)
    • Line 79: warning: comment on exported function HalfAdder should be of the form "HalfAdder ..." (golint)
    • Line 88: warning: comment on exported function FullAdder should be of the form "FullAdder ..." (golint)
    • Line 96: warning: comment on exported function FourBitAdder should be of the form "FourBitAdder ..." (golint)
    • rosettacode-to-go/tasks/Priority-queue/priority-queue.go
    • Line 8: warning: exported type Task should have comment or be unexported (golint)
    • Line 13: warning: exported type TaskPQ should have comment or be unexported (golint)
    • Line 15: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 20: warning: exported method TaskPQ.Push should have comment or be unexported (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 21: warning: exported method TaskPQ.Pop should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rosettacode-to-go/tasks/Grayscale-image/grayscale-image.go
    • Line 34: warning: exported method Grmap.Extent should have comment or be unexported (golint)
    • Line 38: warning: exported method Grmap.Fill should have comment or be unexported (golint)
    • Line 38: warning: receiver name g should be consistent with previous receiver name b for Grmap (golint)
    • Line 44: warning: exported method Grmap.SetPx should have comment or be unexported (golint)
    • Line 44: warning: receiver name g should be consistent with previous receiver name b for Grmap (golint)
    • Line 50: warning: exported method Grmap.GetPx should have comment or be unexported (golint)
    • Line 50: warning: receiver name g should be consistent with previous receiver name b for Grmap (golint)
    • Line 68: warning: receiver name g should be consistent with previous receiver name b for Grmap (golint)
    • rosettacode-to-go/tasks/Hamming-numbers/hamming-numbers-4.go
    • 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)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: don't use underscores in Go names; func log_nodups_hamming should be logNodupsHamming (golint)
    • rosettacode-to-go/tasks/XML-Input/xml-input.go
    • Line 8: warning: don't use underscores in Go names; const XML_Data should be XMLData (golint)
    • Line 8: warning: exported const XML_Data should have comment or be unexported (golint)
    • Line 20: warning: exported type Students should have comment or be unexported (golint)
    • Line 24: warning: exported type Student should have comment or be unexported (golint)
    • Line 31: warning: exported type Pet should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Total-circles-area/total-circles-area.go
    • Line 15: warning: exported type Circle should have comment or be unexported (golint)
    • Line 17: warning: exported function NewCircle should have comment or be unexported (golint)
    • Line 22: warning: exported method Circle.ContainsPt should have comment or be unexported (golint)
    • Line 26: warning: exported method Circle.ContainsC should have comment or be unexported (golint)
    • Line 30: warning: exported method Circle.ContainsR should have comment or be unexported (golint)
    • Line 38: warning: exported method Circle.North should have comment or be unexported (golint)
    • Line 39: warning: exported method Circle.South should have comment or be unexported (golint)
    • Line 40: warning: exported method Circle.West should have comment or be unexported (golint)
    • Line 41: warning: exported method Circle.East should have comment or be unexported (golint)
    • Line 43: warning: exported type Rect should have comment or be unexported (golint)
    • Line 45: warning: exported method Rect.Area should have comment or be unexported (golint)
    • Line 46: warning: exported method Rect.NW should have comment or be unexported (golint)
    • Line 47: warning: exported method Rect.NE should have comment or be unexported (golint)
    • Line 48: warning: exported method Rect.SW should have comment or be unexported (golint)
    • Line 49: warning: exported method Rect.SE should have comment or be unexported (golint)
    • Line 51: warning: exported method Rect.Centre should have comment or be unexported (golint)
    • Line 55: warning: exported method Rect.ContainsPt should have comment or be unexported (golint)
    • Line 60: warning: exported method Rect.ContainsPC should have comment or be unexported (golint)
    • Line 67: warning: exported method Rect.MinSide should have comment or be unexported (golint)
    • Line 76: warning: exported type CircleSet should have comment or be unexported (golint)
    • Line 83: warning: exported method CircleSet.RemoveContainedC should have comment or be unexported (golint)
    • Line 83: warning: receiver name sp should be consistent with previous receiver name s for CircleSet (golint)
    • Line 99: warning: exported method CircleSet.Bounds should have comment or be unexported (golint)
    • Line 115: warning: exported method CircleSet.UnionArea should have comment or be unexported (golint)
    • Line 164: warning: exported method CircleSet.CategorizeR should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Color-quantization/color-quantization.go
    • Line 128: warning: receiver name q should be consistent with previous receiver name qz for quantizer (golint)
    • Line 173: warning: receiver name q should be consistent with previous receiver name qz for quantizer (golint)
    • Line 201: warning: receiver name q should be consistent with previous receiver name qz for quantizer (golint)
    • Line 293: warning: receiver name pq should be consistent with previous receiver name q for queue (golint)
    • Line 297: warning: receiver name pq should be consistent with previous receiver name q for queue (golint)
    • rosettacode-to-go/tasks/Sorting-algorithms-Heapsort/sorting-algorithms-heapsort-1.go
    • Line 9: warning: exported type HeapHelper should have comment or be unexported (golint)
    • Line 14: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 17: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 20: warning: comment on exported method HeapHelper.Push should be of the form "Push ..." (golint)
    • Line 21: 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 HeapHelper.Pop 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)
    • rosettacode-to-go/tasks/Conways-Game-of-Life/conways-game-of-life.go
    • Line 10: warning: exported type Field should have comment or be unexported (golint)
    • Line 15: warning: exported function NewField should have comment or be unexported (golint)
    • Line 23: warning: exported method Field.Set should have comment or be unexported (golint)
    • Line 27: warning: exported method Field.Next should have comment or be unexported (golint)
    • Line 39: warning: exported method Field.State should have comment or be unexported (golint)
    • Line 49: warning: exported type Life should have comment or be unexported (golint)
    • Line 54: warning: exported function NewLife should have comment or be unexported (golint)
    • Line 66: warning: exported method Life.Step should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Pig-the-dice-game-Player/pig-the-dice-game-player.go
    • Line 10: warning: exported type PlayerID should have comment or be unexported (golint)
    • Line 11: warning: exported type MessageID should have comment or be unexported (golint)
    • Line 12: warning: exported type StrategyID should have comment or be unexported (golint)
    • Line 14: warning: exported type PigGameData should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 80: warning: comment on exported method PigGameData.PrintStatus should be of the form "PrintStatus ..." (golint)
    • Line 123: warning: comment on exported method PigGameData.PlayerScore should be of the form "PlayerScore ..." (golint)
    • Line 131: warning: comment on exported method PigGameData.GameOver should be of the form "GameOver ..." (golint)
    • Line 136: warning: comment on exported method PigGameData.Winner should be of the form "Winner ..." (golint)
    • Line 152: warning: exported method PigGameData.Hold should have comment or be unexported (golint)
    • Line 158: warning: exported method PigGameData.NextPlayer should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Currying/currying.go
    • Line 8: warning: exported function PowN should have comment or be unexported (golint)
    • Line 12: warning: exported function PowE should have comment or be unexported (golint)
    • Line 16: warning: exported type Foo should have comment or be unexported (golint)
    • Line 18: warning: exported method Foo.Method should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Percolation-Mean-cluster-density/percolation-mean-cluster-density.go
    • Line 10: warning: don't use underscores in Go names; var n_range should be nRange (golint)
    • Line 11: warning: exported var M should have comment or be unexported (golint)
    • Line 18: warning: exported const NOT_CLUSTERED should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: don't use underscores in Go names; func cluster_density should be clusterDensity (golint)
    • Line 52: warning: don't use underscores in Go names; var walk_index should be walkIndex (golint)
    • Line 64: warning: don't use underscores in Go names; func walk_maze should be walkMaze (golint)
    • rosettacode-to-go/tasks/Queue-Definition/queue-definition.go
    • Line 3: warning: comment on exported type Queue should be of the form "Queue ..." (with optional leading article) (golint)
    • Line 12: warning: exported method Queue.Push should have comment or be unexported (golint)
    • Line 38: warning: exported method Queue.Pop should have comment or be unexported (golint)
    • Line 53: warning: exported method Queue.Empty should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Top-rank-per-group/top-rank-per-group.go
    • Line 8: warning: comment on exported type Employee should be of the form "Employee ..." (with optional leading article) (golint)
    • Line 15: warning: exported type EmployeeList should have comment or be unexported (golint)
    • Line 45: warning: exported type By should have comment or be unexported (golint)
    • Line 51: warning: exported method By.Sort should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method EmployeeList.TopSalariesByDept should be of the form "TopSalariesByDept ..." (golint)
    • rosettacode-to-go/tasks/Textonyms/textonyms.go
    • Line 60: warning: exported type Textonym should have comment or be unexported (golint)
    • Line 67: warning: exported function NewTextonym should have comment or be unexported (golint)
    • Line 77: warning: exported method Textonym.ReadFrom should have comment or be unexported (golint)
    • Line 112: warning: exported method Textonym.Most should have comment or be unexported (golint)
    • Line 126: warning: exported method Textonym.Report should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/24-game-Solve/24-game-solve.go
    • Line 10: warning: don't use underscores in Go names; const op_num should be opNum (golint)
    • Line 11: warning: don't use underscores in Go names; const op_add should be opAdd (golint)
    • Line 12: warning: don't use underscores in Go names; const op_sub should be opSub (golint)
    • Line 13: warning: don't use underscores in Go names; const op_mul should be opMul (golint)
    • Line 14: warning: don't use underscores in Go names; const op_div should be opDiv (golint)
    • Line 21: warning: comment on exported type Expr should be of the form "Expr ..." (with optional leading article) (golint)
    • Line 29: warning: don't use underscores in Go names; var n_cards should be nCards (golint)
    • Line 31: warning: don't use underscores in Go names; var digit_range should be digitRange (golint)
    • Line 69: warning: don't use underscores in Go names; func expr_eval should be exprEval (golint)
    • Line 100: warning: don't use underscores in Go names; func parameter ex_in should be exIn (golint)
    • rosettacode-to-go/tasks/Huffman-coding/huffman-coding-1.go
    • Line 8: warning: exported type HuffmanTree should have comment or be unexported (golint)
    • Line 12: warning: exported type HuffmanLeaf should have comment or be unexported (golint)
    • Line 17: warning: exported type HuffmanNode should have comment or be unexported (golint)
    • Line 22: warning: exported method HuffmanLeaf.Freq 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: exported method HuffmanNode.Freq should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rosettacode-to-go/tasks/Ranking-methods/ranking-methods.go
    • Line 13: warning: exported function StandardRank should have comment or be unexported (golint)
    • Line 25: warning: exported function ModifiedRank should have comment or be unexported (golint)
    • Line 37: warning: exported function DenseRank should have comment or be unexported (golint)
    • Line 49: warning: exported function OrdinalRank should have comment or be unexported (golint)
    • Line 57: warning: exported function FractionalRank should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Zebra-puzzle/zebra-puzzle.go
    • Line 11: warning: exported type HouseSet should have comment or be unexported (golint)
    • Line 12: warning: exported type House should have comment or be unexported (golint)
    • Line 19: warning: exported type Nationality should have comment or be unexported (golint)
    • Line 20: warning: exported type Colour should have comment or be unexported (golint)
    • Line 21: warning: exported type Animal should have comment or be unexported (golint)
    • Line 22: warning: exported type Drink should have comment or be unexported (golint)
    • Line 23: warning: exported type Smoke should have comment or be unexported (golint)
    • Line 28: warning: exported const English should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported const Red should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported const Dog should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const Tea should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported const PallMall should have comment (or a comment on this block) or be unexported (golint)
    • Line 185: warning: exported method House.Valid should have comment or be unexported (golint)
    • Line 237: warning: exported method HouseSet.Valid should have comment or be unexported (golint)
    • rosettacode-to-go/tasks/Array-concatenation/array-concatenation-2.go
    • Line 8: warning: comment on exported function ArrayConcat should be of the form "ArrayConcat ..." (golint)
    • Line 42: warning: comment on exported function ArrayConcatInts should be of the form "ArrayConcatInts ..." (golint)
    • Line 51: warning: don't use underscores in Go names; var test1_a should be test1A (golint)
    • Line 51: warning: don't use underscores in Go names; var test1_b should be test1B (golint)
    • Line 52: warning: don't use underscores in Go names; var test1_c should be test1C (golint)
    • Line 55: warning: don't use underscores in Go names; var test2_a should be test2A (golint)
    • Line 55: warning: don't use underscores in Go names; var test2_b should be test2B (golint)
    • Line 56: warning: don't use underscores in Go names; var test2_c should be test2C (golint)
    • rosettacode-to-go/tasks/Quaternion-type/quaternion-type.go
    • Line 47: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • Line 52: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • Line 57: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • Line 62: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • Line 67: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • Line 72: warning: receiver name z should be consistent with previous receiver name q for qtn (golint)
    • rosettacode-to-go/tasks/Delegates/delegates.go
    • Line 5: warning: exported type Delegator should have comment or be unexported (golint)
    • Line 9: warning: comment on exported type Thingable should be of the form "Thingable ..." (with optional leading article) (golint)
    • Line 14: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: exported type Delegate should have comment or be unexported (golint)

gocyclo98%

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.


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!