Preparing report...

Report for github.com/nextzhou/goderive

A    Great!    Found 15 issues across 19 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!


gocyclo89%

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.


golint21%

Golint is a linter for Go source code.

    • goderive/plugin/set/tpl.go
    • Line 660: warning: exported type TemplateArgs should have comment or be unexported (golint)
    • Line 669: warning: exported method TemplateArgs.GenerateTo should have comment or be unexported (golint)
    • goderive/plugin/access/tpl.go
    • Line 31: warning: exported type TemplateArgs should have comment or be unexported (golint)
    • Line 37: warning: exported type Field should have comment or be unexported (golint)
    • Line 43: warning: exported method TemplateArgs.GenerateTo should have comment or be unexported (golint)
    • Line 50: warning: exported method TemplateArgs.AddField should have comment or be unexported (golint)
    • goderive/plugin/plugin.go
    • Line 1: warning: package comment should be of the form "Package plugin ..." (golint)
    • Line 15: warning: exported const OptionSep should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type OptionType should have comment or be unexported (golint)
    • Line 23: warning: exported const OptionTypeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported method OptionType.IsUnique should have comment or be unexported (golint)
    • Line 33: warning: exported method OptionType.IsIdent should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 47: warning: exported function NewOptions should have comment or be unexported (golint)
    • Line 55: warning: exported method Options.SetFlag should have comment or be unexported (golint)
    • Line 60: warning: exported method Options.SetArg should have comment or be unexported (golint)
    • Line 65: warning: exported method Options.ValidateOption should have comment or be unexported (golint)
    • Line 75: warning: exported function ParseOptions should have comment or be unexported (golint)
    • Line 123: warning: exported method Options.Merge should have comment or be unexported (golint)
    • Line 143: warning: exported method Options.IsEmpty should have comment or be unexported (golint)
    • Line 147: warning: exported type Flag should have comment or be unexported (golint)
    • Line 149: warning: exported type Arg should have comment or be unexported (golint)
    • Line 154: warning: comment on exported type Value should be of the form "Value ..." (with optional leading article) (golint)
    • Line 157: warning: exported method Value.IsNil should have comment or be unexported (golint)
    • Line 161: warning: exported method Value.Str should have comment or be unexported (golint)
    • Line 168: warning: exported method Arg.GetSingleValue should have comment or be unexported (golint)
    • Line 179: warning: exported method Arg.MustGetSingleValue should have comment or be unexported (golint)
    • Line 186: warning: exported method Options.GetFlag should have comment or be unexported (golint)
    • Line 190: warning: exported method Options.WithFlag should have comment or be unexported (golint)
    • Line 194: warning: exported method Options.WithNegativeFlag should have comment or be unexported (golint)
    • Line 198: warning: exported method Options.MustGetValue should have comment or be unexported (golint)
    • Line 205: warning: exported method Options.GetValue should have comment or be unexported (golint)
    • Line 209: warning: exported method Options.GetValues should have comment or be unexported (golint)
    • Line 220: warning: exported method Options.GetValuesOrEmpty should have comment or be unexported (golint)
    • Line 224: warning: comment on exported type Plugin should be of the form "Plugin ..." (with optional leading article) (golint)
    • Line 230: warning: exported type Prerequisites should have comment or be unexported (golint)
    • Line 235: warning: exported function MakePrerequisites should have comment or be unexported (golint)
    • Line 244: warning: exported type Description should have comment or be unexported (golint)
    • Line 253: warning: exported type FlagDescription should have comment or be unexported (golint)
    • Line 259: warning: exported type ArgDescription should have comment or be unexported (golint)
    • Line 269: warning: exported method Description.ToHelpString should have comment or be unexported (golint)
    • Line 325: warning: exported method Description.Validate should have comment or be unexported (golint)
    • Line 402: warning: exported type TypeInfo should have comment or be unexported (golint)
    • Line 408: warning: comment on exported type Entry should be of the form "Entry ..." (with optional leading article) (golint)
    • Line 414: warning: exported method Entry.IsEmpty should have comment or be unexported (golint)
    • Line 418: warning: exported function MakeEntry should have comment or be unexported (golint)
    • Line 422: warning: comment on exported type Import should be of the form "Import ..." (with optional leading article) (golint)
    • Line 428: warning: exported function MakeImport should have comment or be unexported (golint)
    • Line 432: warning: exported function MakeRenamedImport should have comment or be unexported (golint)
    • Line 443: warning: exported method Import.PkgName should have comment or be unexported (golint)
    • Line 456: warning: exported function MakeImportFromAst should have comment or be unexported (golint)
    • Line 465: warning: exported type Env should have comment or be unexported (golint)
    • Line 470: warning: exported function MakeEnv should have comment or be unexported (golint)
    • Line 477: warning: exported method Env.SelectImportForType should have comment or be unexported (golint)
    • goderive/goderive.go
    • Line 21: warning: exported var Version should have comment or be unexported (golint)
    • Line 46: warning: exported type Derive should have comment or be unexported (golint)
    • Line 60: warning: exported function NewDerive should have comment or be unexported (golint)
    • Line 87: warning: exported method Derive.RegisterPlugin should have comment or be unexported (golint)
    • Line 91: warning: exported method Derive.Execute should have comment or be unexported (golint)
    • Line 100: warning: exported method Derive.HelpString should have comment or be unexported (golint)
    • Line 133: warning: exported method Derive.ListGoFiles should have comment or be unexported (golint)
    • Line 174: warning: exported method Derive.ExcludePath should have comment or be unexported (golint)
    • Line 181: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 186: warning: exported method Derive.Run should have comment or be unexported (golint)
    • Line 316: warning: exported method Derive.Help should have comment or be unexported (golint)
    • Line 334: warning: exported method Derive.ValidatePluginOptions should have comment or be unexported (golint)
    • Line 342: warning: exported method Derive.GetPlugin should have comment or be unexported (golint)
    • goderive/utils/common.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 14: warning: exported function Capitalize should have comment or be unexported (golint)
    • Line 26: warning: exported type TableWriter should have comment or be unexported (golint)
    • Line 30: warning: exported function NewTableWriter should have comment or be unexported (golint)
    • Line 40: warning: exported method TableWriter.Append should have comment or be unexported (golint)
    • Line 44: warning: exported method TableWriter.Render should have comment or be unexported (golint)
    • Line 48: warning: comment on exported type Str should be of the form "Str ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported type Str2 should be of the form "Str2 ..." (with optional leading article) (golint)
    • Line 54: warning: exported const HeaderComment should have comment or be unexported (golint)
    • Line 56: warning: exported function ToExported should have comment or be unexported (golint)
    • Line 63: warning: exported function ToUnexported should have comment or be unexported (golint)
    • Line 70: warning: comment on exported function SplitSelectorExpr should be of the form "SplitSelectorExpr ..." (golint)
    • Line 79: warning: exported function SelectorExprString should have comment or be unexported (golint)
    • Line 83: warning: comment on exported function PkgNameFromPath should be of the form "PkgNameFromPath ..." (golint)
    • Line 95: warning: exported type NameWithPkg should have comment or be unexported (golint)
    • Line 100: warning: exported function NewNameWithPkg should have comment or be unexported (golint)
    • Line 107: warning: exported function TypeNameWithPkg should have comment or be unexported (golint)
    • Line 183: warning: exported function FuncTypeNameWithPkg should have comment or be unexported (golint)
    • Line 257: warning: exported function ExprTypeStr should have comment or be unexported (golint)
    • goderive/plugin/set/set.go
    • Line 10: warning: exported type Set should have comment or be unexported (golint)
    • Line 14: warning: exported method Set.Describe should have comment or be unexported (golint)
    • Line 33: warning: exported method Set.GenerateTo should have comment or be unexported (golint)
    • Line 81: warning: exported var UnstableOrder should have comment or be unexported (golint)
    • goderive/utils/tribool.go
    • Line 3: warning: exported type TriBool should have comment or be unexported (golint)
    • Line 6: warning: exported const TriBoolUndefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported function BoolToTri should have comment or be unexported (golint)
    • Line 18: warning: exported function BoolPtrToTri should have comment or be unexported (golint)
    • Line 25: warning: exported method TriBool.IsUndefined should have comment or be unexported (golint)
    • Line 29: warning: exported method TriBool.IsTrue should have comment or be unexported (golint)
    • Line 33: warning: exported method TriBool.IsFalse should have comment or be unexported (golint)
    • Line 37: warning: exported method TriBool.Not should have comment or be unexported (golint)
    • Line 49: warning: exported method TriBool.And should have comment or be unexported (golint)
    • Line 64: warning: exported method TriBool.Or should have comment or be unexported (golint)
    • Line 79: warning: exported method TriBool.UnwrapOr should have comment or be unexported (golint)
    • goderive/tests/examples.go
    • Line 1: warning: package comment should be of the form "Package tests ..." (golint)
    • Line 11: warning: comment on exported type Int should be of the form "Int ..." (with optional leading article) (golint)
    • Line 15: warning: comment on exported type Int2 should be of the form "Int2 ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported type Int3 should be of the form "Int3 ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported type T should be of the form "T ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type S should be of the form "S ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type MyType should be of the form "MyType ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type AA should be of the form "AA ..." (with optional leading article) (golint)
    • Line 77: warning: comment on exported type NotComparableType should be of the form "NotComparableType ..." (with optional leading article) (golint)
    • goderive/plugin/access/access.go
    • Line 12: warning: exported type Access should have comment or be unexported (golint)
    • Line 16: warning: exported method Access.Describe should have comment or be unexported (golint)
    • Line 29: warning: exported method Access.GenerateTo should have comment or be unexported (golint)
    • goderive/parser.go
    • Line 15: warning: exported type TypeInfo should have comment or be unexported (golint)
    • Line 23: warning: exported function ExtractTypes should have comment or be unexported (golint)
    • goderive/utils/checker.go
    • Line 11: warning: exported function ValidateIdentName should have comment or be unexported (golint)
    • Line 15: warning: exported function IsSortableType should have comment or be unexported (golint)
    • Line 26: warning: exported function IsComparableSimpleType should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function IsComparableType should be of the form "IsComparableType ..." (golint)
    • Line 56: warning: exported function IsBaseType should have comment or be unexported (golint)
    • Line 68: warning: exported function IsExported should have comment or be unexported (golint)
    • Line 80: warning: exported function IsSelectorExpr should have comment or be unexported (golint)
    • Line 84: warning: exported function IsLocalPath should have comment or be unexported (golint)
    • goderive/utils/comment.go
    • Line 9: warning: exported type DeriveComment should have comment or be unexported (golint)
    • Line 14: warning: exported function MatchDeriveComment should have comment or be unexported (golint)
    • Line 35: warning: exported function MatchPluginComment should have comment or be unexported (golint)
    • goderive/plugin/slice/slice.go
    • Line 10: warning: exported type Slice should have comment or be unexported (golint)
    • Line 14: warning: exported method Slice.Describe should have comment or be unexported (golint)
    • Line 30: warning: exported method Slice.GenerateTo should have comment or be unexported (golint)
    • goderive/utils/errors.go
    • Line 5: warning: exported type InvalidIdentError should have comment or be unexported (golint)
    • Line 14: warning: exported type ConflictingOptionError should have comment or be unexported (golint)
    • Line 23: warning: exported type UnexpectedError should have comment or be unexported (golint)
    • Line 35: warning: exported type OnlySupportError should have comment or be unexported (golint)
    • Line 44: warning: exported type UnsupportedError should have comment or be unexported (golint)
    • Line 56: warning: exported type ArgNotSingleValueError should have comment or be unexported (golint)
    • Line 64: warning: exported type ArgEmptyValueError should have comment or be unexported (golint)
    • Line 72: warning: exported type NotExistedError should have comment or be unexported (golint)
    • Line 81: warning: exported type UnmatchedError should have comment or be unexported (golint)
    • goderive/plugin/slice/tpl.go
    • Line 502: warning: exported type TemplateArgs should have comment or be unexported (golint)
    • Line 511: warning: exported method TemplateArgs.GenerateTo 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!