Preparing report...

Report for github.com/ynqa/wego

A+    Excellent!    Found 37 issues across 54 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!


golint31%

Golint is a linter for Go source code.

    • wego/pkg/util/verbose/verbose.go
    • Line 17: warning: exported type Verbose should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method Verbose.Do should have comment or be unexported (golint)
    • wego/cmd/model/cmdutil/cmdutil.go
    • Line 32: warning: exported function AddInputFlags should have comment or be unexported (golint)
    • Line 36: warning: exported function AddOutputFlags should have comment or be unexported (golint)
    • Line 40: warning: exported function AddProfFlags should have comment or be unexported (golint)
    • Line 44: warning: exported function AddVectorTypeFlags should have comment or be unexported (golint)
    • wego/pkg/util/clock/clock.go
    • Line 21: warning: exported type Clock should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 33: warning: exported method Clock.AllElapsed should have comment or be unexported (golint)
    • wego/pkg/model/modelutil/vector/vector.go
    • Line 30: warning: exported function InvalidTypeError should have comment or be unexported (golint)
    • Line 34: warning: exported type Type should have comment or be unexported (golint)
    • Line 37: warning: exported const Single should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported function Save should have comment or be unexported (golint)
    • wego/pkg/corpus/options.go
    • Line 26: warning: exported type Options should have comment or be unexported (golint)
    • Line 31: warning: exported function DefaultOptions should have comment or be unexported (golint)
    • Line 38: warning: exported function LoadForCmd should have comment or be unexported (golint)
    • wego/pkg/corpus/cpsutil/cpsutil.go
    • Line 30: warning: exported function ReadWord should have comment or be unexported (golint)
    • Line 46: warning: exported function ReadWordWithForwardContext should have comment or be unexported (golint)
    • Line 96: warning: exported type Filters should have comment or be unexported (golint)
    • Line 98: warning: exported method Filters.Any should have comment or be unexported (golint)
    • Line 106: warning: exported type FilterFn should have comment or be unexported (golint)
    • Line 108: warning: exported function MaxCount should have comment or be unexported (golint)
    • Line 114: warning: exported function MinCount should have comment or be unexported (golint)
    • wego/pkg/corpus/memory/memory.go
    • Line 30: warning: exported type Corpus should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 56: warning: exported method Corpus.IndexedDoc should have comment or be unexported (golint)
    • Line 67: warning: exported method Corpus.BatchWords should have comment or be unexported (golint)
    • Line 71: warning: exported method Corpus.Dictionary should have comment or be unexported (golint)
    • Line 75: warning: exported method Corpus.Cooccurrence should have comment or be unexported (golint)
    • Line 79: warning: exported method Corpus.Len should have comment or be unexported (golint)
    • Line 83: warning: exported method Corpus.Load should have comment or be unexported (golint)
    • wego/pkg/corpus/cooccurrence/cooccurrence.go
    • Line 26: warning: exported type CountType should have comment or be unexported (golint)
    • Line 29: warning: exported const Increment should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type Cooccurrence should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 54: warning: exported method Cooccurrence.EncodedMatrix should have comment or be unexported (golint)
    • Line 58: warning: exported method Cooccurrence.Add should have comment or be unexported (golint)
    • wego/pkg/model/lexvec/options.go
    • Line 24: warning: exported type RelationType should have comment or be unexported (golint)
    • Line 27: warning: exported const PPMI should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported type Options should have comment or be unexported (golint)
    • Line 75: warning: exported function DefaultOptions should have comment or be unexported (golint)
    • Line 97: warning: exported function LoadForCmd should have comment or be unexported (golint)
    • Line 119: warning: exported type ModelOption should have comment or be unexported (golint)
    • Line 121: warning: exported function BatchSize should have comment or be unexported (golint)
    • Line 127: warning: exported function DocInMemory should have comment or be unexported (golint)
    • Line 133: warning: exported function Goroutines should have comment or be unexported (golint)
    • Line 139: warning: exported function Dim should have comment or be unexported (golint)
    • Line 145: warning: exported function Initlr should have comment or be unexported (golint)
    • Line 151: warning: exported function Iter should have comment or be unexported (golint)
    • Line 157: warning: exported function LogBatch should have comment or be unexported (golint)
    • Line 163: warning: exported function MaxCount should have comment or be unexported (golint)
    • Line 169: warning: exported function MinCount should have comment or be unexported (golint)
    • Line 175: warning: exported function MinLR should have comment or be unexported (golint)
    • Line 181: warning: exported function NegativeSampleSize should have comment or be unexported (golint)
    • Line 187: warning: exported function Relation should have comment or be unexported (golint)
    • Line 193: warning: exported function Smooth should have comment or be unexported (golint)
    • Line 199: warning: exported function SubsampleThreshold should have comment or be unexported (golint)
    • Line 205: warning: exported function ToLower should have comment or be unexported (golint)
    • Line 211: warning: exported function UpdateLRBatch should have comment or be unexported (golint)
    • Line 217: warning: exported function Verbose should have comment or be unexported (golint)
    • Line 223: warning: exported function Window should have comment or be unexported (golint)
    • wego/pkg/embedding/embedding.go
    • Line 28: warning: exported type Embedding should have comment or be unexported (golint)
    • Line 35: warning: exported method Embedding.Validate should have comment or be unexported (golint)
    • Line 46: warning: exported type Embeddings should have comment or be unexported (golint)
    • Line 48: warning: exported method Embeddings.Empty should have comment or be unexported (golint)
    • Line 52: warning: exported method Embeddings.Find should have comment or be unexported (golint)
    • Line 61: warning: exported method Embeddings.Validate should have comment or be unexported (golint)
    • Line 73: warning: exported function Load should have comment or be unexported (golint)
    • wego/pkg/model/word2vec/model.go
    • Line 138: warning: receiver name c should be consistent with previous receiver name mod for cbow (golint)
    • Line 144: warning: receiver name c should be consistent with previous receiver name mod for cbow (golint)
    • wego/pkg/corpus/dictionary/dictionary.go
    • Line 21: warning: exported type Dictionary should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 39: warning: exported method Dictionary.Len should have comment or be unexported (golint)
    • Line 43: warning: exported method Dictionary.ID should have comment or be unexported (golint)
    • Line 48: warning: exported method Dictionary.WordFreq should have comment or be unexported (golint)
    • Line 56: warning: exported method Dictionary.Word should have comment or be unexported (golint)
    • Line 63: warning: exported method Dictionary.IDFreq should have comment or be unexported (golint)
    • Line 70: warning: exported method Dictionary.Add should have comment or be unexported (golint)
    • wego/pkg/corpus/fs/fs.go
    • Line 30: warning: exported type Corpus should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 54: warning: exported method Corpus.IndexedDoc should have comment or be unexported (golint)
    • Line 58: warning: exported method Corpus.BatchWords should have comment or be unexported (golint)
    • Line 87: warning: exported method Corpus.Dictionary should have comment or be unexported (golint)
    • Line 91: warning: exported method Corpus.Cooccurrence should have comment or be unexported (golint)
    • Line 95: warning: exported method Corpus.Len should have comment or be unexported (golint)
    • Line 99: warning: exported method Corpus.Load should have comment or be unexported (golint)
    • wego/pkg/model/word2vec/options.go
    • Line 24: warning: exported type ModelType should have comment or be unexported (golint)
    • Line 27: warning: exported const Cbow should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type OptimizerType should have comment or be unexported (golint)
    • Line 34: warning: exported const NegativeSampling should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported type Options should have comment or be unexported (golint)
    • Line 82: warning: exported function DefaultOptions should have comment or be unexported (golint)
    • Line 106: warning: exported function LoadForCmd should have comment or be unexported (golint)
    • Line 128: warning: exported type ModelOption should have comment or be unexported (golint)
    • Line 130: warning: exported function BatchSize should have comment or be unexported (golint)
    • Line 136: warning: exported function DocInMemory should have comment or be unexported (golint)
    • Line 142: warning: exported function Goroutines should have comment or be unexported (golint)
    • Line 148: warning: exported function Dim should have comment or be unexported (golint)
    • Line 154: warning: exported function Initlr should have comment or be unexported (golint)
    • Line 160: warning: exported function Iter should have comment or be unexported (golint)
    • Line 166: warning: exported function LogBatch should have comment or be unexported (golint)
    • Line 172: warning: exported function MaxCount should have comment or be unexported (golint)
    • Line 178: warning: exported function MaxDepth should have comment or be unexported (golint)
    • Line 184: warning: exported function MinCount should have comment or be unexported (golint)
    • Line 190: warning: exported function MinLR should have comment or be unexported (golint)
    • Line 196: warning: exported function Model should have comment or be unexported (golint)
    • Line 202: warning: exported function NegativeSampleSize should have comment or be unexported (golint)
    • Line 208: warning: exported function Optimizer should have comment or be unexported (golint)
    • Line 214: warning: exported function SubsampleThreshold should have comment or be unexported (golint)
    • Line 220: warning: exported function ToLower should have comment or be unexported (golint)
    • Line 226: warning: exported function UpdateLRBatch should have comment or be unexported (golint)
    • Line 232: warning: exported function Verbose should have comment or be unexported (golint)
    • Line 238: warning: exported function Window should have comment or be unexported (golint)
    • wego/pkg/corpus/filter/options.go
    • Line 28: warning: exported type Options should have comment or be unexported (golint)
    • Line 33: warning: exported function DefaultOption should have comment or be unexported (golint)
    • Line 40: warning: exported function LoadForCmd should have comment or be unexported (golint)
    • Line 45: warning: exported type FilterFn should have comment or be unexported (golint)
    • Line 47: warning: exported function MaxCount should have comment or be unexported (golint)
    • Line 53: warning: exported function MinCount should have comment or be unexported (golint)
    • wego/pkg/model/modelutil/matrix/matrix.go
    • Line 17: warning: exported type Matrix should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 39: warning: exported method Matrix.Row should have comment or be unexported (golint)
    • Line 43: warning: exported method Matrix.Col should have comment or be unexported (golint)
    • Line 47: warning: exported method Matrix.Slice should have comment or be unexported (golint)
    • wego/pkg/corpus/corpus.go
    • Line 23: warning: exported type Corpus should have comment or be unexported (golint)
    • Line 32: warning: exported type WithCooccurrence should have comment or be unexported (golint)
    • wego/pkg/search/console/console.go
    • Line 40: warning: exported type Console should have comment or be unexported (golint)
    • Line 47: warning: exported function New should have comment or be unexported (golint)
    • Line 64: warning: exported method Console.Run should have comment or be unexported (golint)
    • wego/pkg/search/search.go
    • Line 37: warning: exported type Neighbors should have comment or be unexported (golint)
    • Line 39: warning: exported method Neighbors.Describe should have comment or be unexported (golint)
    • Line 56: warning: exported type Searcher should have comment or be unexported (golint)
    • Line 60: warning: exported function New should have comment or be unexported (golint)
    • Line 69: warning: exported method Searcher.SearchInternal should have comment or be unexported (golint)
    • Line 88: warning: exported method Searcher.SearchVector should have comment or be unexported (golint)
    • Line 95: warning: exported method Searcher.Search should have comment or be unexported (golint)
    • wego/pkg/model/glove/options.go
    • Line 1: warning: package comment should be of the form "Package glove ..." (golint)
    • Line 24: warning: exported type SolverType should have comment or be unexported (golint)
    • Line 27: warning: exported const Stochastic should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type Options should have comment or be unexported (golint)
    • Line 71: warning: exported function DefaultOptions should have comment or be unexported (golint)
    • Line 93: warning: exported function LoadForCmd should have comment or be unexported (golint)
    • Line 113: warning: exported type ModelOption should have comment or be unexported (golint)
    • Line 115: warning: exported function Alpha should have comment or be unexported (golint)
    • Line 121: warning: exported function BatchSize should have comment or be unexported (golint)
    • Line 127: warning: exported function DocInMemory should have comment or be unexported (golint)
    • Line 133: warning: exported function Goroutines should have comment or be unexported (golint)
    • Line 139: warning: exported function Dim should have comment or be unexported (golint)
    • Line 145: warning: exported function Initlr should have comment or be unexported (golint)
    • Line 151: warning: exported function Iter should have comment or be unexported (golint)
    • Line 157: warning: exported function MaxCount should have comment or be unexported (golint)
    • Line 163: warning: exported function MinCount should have comment or be unexported (golint)
    • Line 169: warning: exported function Solver should have comment or be unexported (golint)
    • Line 175: warning: exported function SubsampleThreshold should have comment or be unexported (golint)
    • Line 181: warning: exported function ToLower should have comment or be unexported (golint)
    • Line 187: warning: exported function Verbose should have comment or be unexported (golint)
    • Line 193: warning: exported function Window should have comment or be unexported (golint)
    • Line 199: warning: exported function Xmax should have comment or be unexported (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!


misspell98%

Misspell Finds commonly misspelled English words