Preparing report...

Report for github.com/syou6162/go-active-learning

A+    Excellent!    Found 40 issues across 58 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!


gocyclo87%

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.


golint44%

Golint is a linter for Go source code.

    • go-active-learning/lib/feature/tweet/tweet.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 12: warning: exported type ExampleAndTweet should have comment or be unexported (golint)
    • Line 22: warning: exported method ExampleAndTweet.GetLabel should have comment or be unexported (golint)
    • Line 26: warning: exported function GetExampleAndTweet should have comment or be unexported (golint)
    • Line 40: warning: exported function GetLCSLen should have comment or be unexported (golint)
    • Line 44: warning: exported function LCSLenFeature should have comment or be unexported (golint)
    • Line 65: warning: exported function CleanedLCSLenFeature should have comment or be unexported (golint)
    • Line 86: warning: exported function LCSRatioFeature should have comment or be unexported (golint)
    • Line 107: warning: exported function CleanedLCSRatioFeature should have comment or be unexported (golint)
    • Line 128: warning: exported function FavoriteCountFeature should have comment or be unexported (golint)
    • Line 153: warning: exported function RetweetCountFeature should have comment or be unexported (golint)
    • Line 178: warning: exported function AtMarksCountFeature should have comment or be unexported (golint)
    • Line 197: warning: exported function HashTagsCountFeature should have comment or be unexported (golint)
    • Line 216: warning: exported function TextLengthFeature should have comment or be unexported (golint)
    • Line 241: warning: exported function CleanedTextLengthFeature should have comment or be unexported (golint)
    • Line 266: warning: exported function ScreenNameFeature should have comment or be unexported (golint)
    • Line 271: warning: exported method ExampleAndTweet.GetFeatureVector should have comment or be unexported (golint)
    • go-active-learning/lib/evaluation/evaluation.go
    • Line 7: warning: exported function GetAccuracy should have comment or be unexported (golint)
    • Line 20: warning: exported function GetPrecision should have comment or be unexported (golint)
    • Line 34: warning: exported function GetRecall should have comment or be unexported (golint)
    • Line 48: warning: exported function GetConfusionMatrix should have comment or be unexported (golint)
    • go-active-learning/lib/annotation/annotation_cli.go
    • Line 120: warning: exported type FeatureWeightPair should have comment or be unexported (golint)
    • Line 125: warning: exported type FeatureWeightPairs should have comment or be unexported (golint)
    • Line 127: warning: exported function SortedActiveFeatures should have comment or be unexported (golint)
    • Line 148: warning: exported function ShowActiveFeatures should have comment or be unexported (golint)
    • go-active-learning/lib/feature/example/example.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 41: warning: exported function GetJapaneseTokenizer should have comment or be unexported (golint)
    • Line 50: warning: exported function GetEnglishTokenizer should have comment or be unexported (golint)
    • Line 57: warning: exported function GetEnglishTagger should have comment or be unexported (golint)
    • Line 78: warning: exported function IsExcludingWord should have comment or be unexported (golint)
    • Line 120: warning: exported function ExtractJpnNounFeaturesWithoutPrefix should have comment or be unexported (golint)
    • Line 142: warning: exported function ExtractJpnNounFeatures should have comment or be unexported (golint)
    • Line 150: warning: exported function ExtractNounFeatures should have comment or be unexported (golint)
    • Line 153: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 158: warning: exported function ExtractNounFeaturesWithoutPrefix should have comment or be unexported (golint)
    • Line 161: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 166: warning: exported function ExtractHostFeature should have comment or be unexported (golint)
    • Line 175: warning: exported function ExtractPath should have comment or be unexported (golint)
    • go-active-learning/lib/model/hatena_bookmark.go
    • Line 10: warning: exported type Tags should have comment or be unexported (golint)
    • Line 12: warning: exported type HatenaBookmarkTime should have comment or be unexported (golint)
    • Line 16: warning: comment on exported method HatenaBookmarkTime.UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • Line 23: warning: exported method HatenaBookmarkTime.MarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method HatenaBookmarkTime.Scan should be of the form "Scan ..." (golint)
    • Line 34: warning: exported method HatenaBookmarkTime.Value should have comment or be unexported (golint)
    • Line 38: warning: exported method Tags.Scan should have comment or be unexported (golint)
    • Line 49: warning: exported method Tags.Value should have comment or be unexported (golint)
    • Line 53: warning: exported type Bookmark should have comment or be unexported (golint)
    • Line 61: warning: exported type HatenaBookmark should have comment or be unexported (golint)
    • Line 73: warning: exported method HatenaBookmark.MarshalBinary should have comment or be unexported (golint)
    • Line 81: warning: exported method HatenaBookmark.UnmarshalBinary should have comment or be unexported (golint)
    • go-active-learning/lib/model/recommendation.go
    • Line 5: warning: exported type RecommendationListType should have comment or be unexported (golint)
    • Line 8: warning: exported const GENERAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported function GetRecommendationListType should have comment or be unexported (golint)
    • Line 38: warning: exported type Recommendation should have comment or be unexported (golint)
    • go-active-learning/lib/feature/feature.go
    • Line 7: warning: exported type FeatureVector should have comment or be unexported (golint)
    • Line 9: warning: exported method FeatureVector.MarshalBinary should have comment or be unexported (golint)
    • Line 17: warning: exported method FeatureVector.UnmarshalBinary should have comment or be unexported (golint)
    • go-active-learning/lib/model/label_type.go
    • Line 7: warning: exported type LabelType should have comment or be unexported (golint)
    • Line 9: warning: exported method LabelType.MarshalBinary should have comment or be unexported (golint)
    • Line 13: warning: exported method LabelType.UnmarshalBinary should have comment or be unexported (golint)
    • Line 21: warning: exported const POSITIVE should have comment (or a comment on this block) or be unexported (golint)
    • go-active-learning/lib/util/util.go
    • Line 9: warning: exported function FilterLabeledExamples should have comment or be unexported (golint)
    • Line 19: warning: exported function FilterUnlabeledExamples should have comment or be unexported (golint)
    • Line 47: warning: exported function RemoveDuplicate should have comment or be unexported (golint)
    • Line 59: warning: exported function FilterStatusCodeOkExamples should have comment or be unexported (golint)
    • Line 71: warning: exported function FilterStatusCodeNotOkExamples should have comment or be unexported (golint)
    • Line 83: warning: exported function RemoveExample should have comment or be unexported (golint)
    • Line 95: warning: exported function RemoveNegativeExamples should have comment or be unexported (golint)
    • Line 105: warning: exported function UniqueByFinalUrl should have comment or be unexported (golint)
    • Line 117: warning: exported function UniqueByTitle should have comment or be unexported (golint)
    • Line 129: warning: exported function GetEnv should have comment or be unexported (golint)
    • go-active-learning/lib/service/service.go
    • Line 13: warning: exported type GoActiveLearningApp should have comment or be unexported (golint)
    • Line 67: warning: exported function NewApp should have comment or be unexported (golint)
    • Line 71: warning: exported function NewDefaultApp should have comment or be unexported (golint)
    • go-active-learning/lib/repository/repository.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported type Repository should have comment or be unexported (golint)
    • Line 85: warning: exported function GetDataSourceName should have comment or be unexported (golint)
    • Line 96: warning: exported function New should have comment or be unexported (golint)
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-active-learning/lib/annotation/annotation.go
    • Line 9: warning: exported type ActionType should have comment or be unexported (golint)
    • Line 12: warning: exported const LABEL_AS_POSITIVE should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported function NextExampleToBeAnnotated should have comment or be unexported (golint)
    • Line 48: warning: exported var ActionHelpDoc should have comment or be unexported (golint)
    • Line 56: warning: exported var CommandAnnotate should have comment or be unexported (golint)
    • go-active-learning/lib/fetcher/fetcher.go
    • Line 19: warning: exported type Article should have comment or be unexported (golint)
    • Line 90: warning: exported function GetArticle should have comment or be unexported (golint)
    • Line 103: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 113: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • go-active-learning/lib/classifier/mira.go
    • Line 19: warning: exported type ModelType should have comment or be unexported (golint)
    • Line 22: warning: exported const EXAMPLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type MIRAClassifier should have comment or be unexported (golint)
    • Line 36: warning: exported type LearningInstance should have comment or be unexported (golint)
    • Line 41: warning: exported type LearningInstances should have comment or be unexported (golint)
    • Line 88: warning: exported function NewMIRAClassifier should have comment or be unexported (golint)
    • Line 134: warning: exported type MIRAClassifierList should have comment or be unexported (golint)
    • Line 173: warning: exported function NewMIRAClassifierByCrossValidation should have comment or be unexported (golint)
    • Line 260: warning: exported method MIRAClassifier.PredictScore should have comment or be unexported (golint)
    • Line 271: warning: exported method MIRAClassifier.Predict should have comment or be unexported (golint)
    • Line 278: warning: exported method MIRAClassifier.SortByScore should have comment or be unexported (golint)
    • Line 291: warning: exported method MIRAClassifier.GetWeight should have comment or be unexported (golint)
    • Line 299: warning: exported method MIRAClassifier.GetActiveFeatures should have comment or be unexported (golint)
    • go-active-learning/lib/model/example.go
    • Line 11: warning: exported type Example should have comment or be unexported (golint)
    • Line 34: warning: exported type Examples should have comment or be unexported (golint)
    • Line 36: warning: exported method Example.GetLabel should have comment or be unexported (golint)
    • Line 40: warning: exported method Example.GetFeatureVector should have comment or be unexported (golint)
    • Line 44: warning: exported method Example.Annotate should have comment or be unexported (golint)
    • Line 48: warning: exported method Example.IsLabeled should have comment or be unexported (golint)
    • Line 52: warning: exported method Example.IsTwitterUrl should have comment or be unexported (golint)
    • Line 57: warning: exported method Example.IsArticle should have comment or be unexported (golint)
    • go-active-learning/lib/example/example.go
    • Line 11: warning: exported function NewExample should have comment or be unexported (golint)
    • Line 40: warning: exported function GetStat should have comment or be unexported (golint)
    • Line 55: warning: exported function ExtractFeatures should have comment or be unexported (golint)
    • go-active-learning/lib/util/file/file.go
    • Line 15: warning: exported function ParseLine should have comment or be unexported (golint)
    • Line 28: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 31: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 35: warning: exported function ReadExamples should have comment or be unexported (golint)
    • Line 58: warning: exported function WriteExamples should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words

    • go-active-learning/lib/add/add.go
    • Line 62: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 62: warning: "proccessing" is a misspelling of "processing" (misspell)
    • Line 66: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 66: warning: "proccessing" is a misspelling of "processing" (misspell)