Preparing report...

Report for github.com/syou6162/go-easy-first

A+    Excellent!    Found 10 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!


golint41%

Golint is a linter for Go source code.

    • go-easy-first/sentence.go
    • Line 3: warning: exported type Sentence should have comment or be unexported (golint)
    • Line 7: warning: comment on exported method Sentence.ExtractHeads should be of the form "ExtractHeads ..." (golint)
    • Line 16: warning: exported method Sentence.ExtractPredictedHeads should have comment or be unexported (golint)
    • go-easy-first/state.go
    • Line 10: warning: exported type FvCache should have comment or be unexported (golint)
    • Line 12: warning: exported type State should have comment or be unexported (golint)
    • Line 25: warning: exported method State.InitFvCache should have comment or be unexported (golint)
    • Line 35: warning: exported function NewState should have comment or be unexported (golint)
    • Line 51: warning: exported method State.ResetFvCache should have comment or be unexported (golint)
    • Line 62: warning: exported method State.GetFvCache should have comment or be unexported (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • go-easy-first/reader.go
    • Line 38: warning: exported function ReadData should have comment or be unexported (golint)
    • Line 60: warning: exported function SaveModel should have comment or be unexported (golint)
    • Line 72: warning: exported function LoadModel should have comment or be unexported (golint)
    • go-easy-first/feature.go
    • Line 10: warning: exported function NilSafePosTag should have comment or be unexported (golint)
    • Line 18: warning: exported function NilSafePendingWord should have comment or be unexported (golint)
    • Line 21: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 61: warning: exported function AddBigramFeatures should have comment or be unexported (golint)
    • Line 85: warning: exported function AddUnigramFeatures should have comment or be unexported (golint)
    • Line 109: warning: exported function AddStructuralSingleFeatures should have comment or be unexported (golint)
    • Line 158: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 163: warning: exported var MaxFeatureLength should have comment or be unexported (golint)
    • Line 165: warning: exported function JenkinsHash should have comment or be unexported (golint)
    • Line 180: warning: exported function ExtractFeatures should have comment or be unexported (golint)
    • go-easy-first/perceptron.go
    • Line 63: warning: exported type ActionIndexPair should have comment or be unexported (golint)
    • Line 68: warning: exported method ActionIndexPair.SameActionIndexPair should have comment or be unexported (golint)
    • Line 73: warning: exported function AllowedActions should have comment or be unexported (golint)
    • Line 85: warning: exported function CandidateActions should have comment or be unexported (golint)
    • Line 95: warning: exported function DotProduct should have comment or be unexported (golint)
    • Line 103: warning: exported function BestActionIndexPair should have comment or be unexported (golint)
    • Line 118: warning: exported function BestAllowedActionIndexPair should have comment or be unexported (golint)
    • Line 132: warning: exported type Model should have comment or be unexported (golint)
    • Line 138: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 158: warning: exported method Model.Update should have comment or be unexported (golint)
    • Line 190: warning: comment on exported method Model.AveragedWeight should be of the form "AveragedWeight ..." (golint)
    • go-easy-first/word.go
    • Line 3: warning: exported type Word should have comment or be unexported (golint)
    • Line 32: warning: exported method Word.LeftMostChild should have comment or be unexported (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 40: warning: exported method Word.RightMostChild should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

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!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words