Preparing report...

Report for github.com/khanhtc1202/chio

A+    Excellent!    Found 12 issues across 21 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!


golint47%

Golint is a linter for Go source code.

    • chio/pkg/module.go
    • Line 11: warning: exported type Module should have comment or be unexported (golint)
    • Line 20: warning: exported function NewModule should have comment or be unexported (golint)
    • Line 28: warning: exported method Module.AddSourceFile should have comment or be unexported (golint)
    • Line 34: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 37: warning: exported method Module.AddSourceFiles should have comment or be unexported (golint)
    • Line 47: warning: exported method Module.GetSourceFilesPath should have comment or be unexported (golint)
    • Line 55: warning: exported method Module.Instability should have comment or be unexported (golint)
    • Line 61: warning: exported method Module.Abstractness should have comment or be unexported (golint)
    • Line 67: warning: exported method Module.Distance should have comment or be unexported (golint)
    • chio/pkg/module_factory.go
    • Line 12: warning: exported type ModuleFactory should have comment or be unexported (golint)
    • Line 16: warning: exported function ModuleFactoryBySign should have comment or be unexported (golint)
    • Line 25: warning: exported type NDepthDirectoryAsModule should have comment or be unexported (golint)
    • Line 29: warning: exported function NewNDepthDirectoryAsModule should have comment or be unexported (golint)
    • Line 35: warning: exported method NDepthDirectoryAsModule.Load should have comment or be unexported (golint)
    • Line 55: warning: exported type OneDepthDirectoryAsModule should have comment or be unexported (golint)
    • Line 59: warning: exported function NewOneDepthDirectoryAsModule should have comment or be unexported (golint)
    • Line 65: warning: exported method OneDepthDirectoryAsModule.Load should have comment or be unexported (golint)
    • Line 116: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • chio/pkg/modules.go
    • Line 9: warning: exported type Modules should have comment or be unexported (golint)
    • Line 11: warning: exported function NewModules should have comment or be unexported (golint)
    • Line 15: warning: exported method Modules.Add should have comment or be unexported (golint)
    • Line 17: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 24: warning: exported method Modules.GetModuleByPath should have comment or be unexported (golint)
    • Line 33: warning: exported method Modules.Load should have comment or be unexported (golint)
    • chio/pkg/source_file.go
    • Line 8: warning: exported type SourceFiles should have comment or be unexported (golint)
    • Line 10: warning: exported function EmptySourceFiles should have comment or be unexported (golint)
    • Line 14: warning: exported type SourceFile should have comment or be unexported (golint)
    • Line 18: warning: exported function NewSourceFile should have comment or be unexported (golint)
    • Line 25: warning: exported method SourceFile.Name should have comment or be unexported (golint)
    • Line 30: warning: exported method SourceFile.DirPath should have comment or be unexported (golint)
    • Line 36: warning: exported method SourceFile.Content should have comment or be unexported (golint)
    • chio/pkg/loaders/go_loader.go
    • Line 17: warning: exported type GoFileLoader should have comment or be unexported (golint)
    • Line 20: warning: exported method GoFileLoader.CountConcreteMembers should have comment or be unexported (golint)
    • Line 38: warning: exported method GoFileLoader.CountAbstractMembers should have comment or be unexported (golint)
    • Line 56: warning: exported method GoFileLoader.ReferenceToPaths should have comment or be unexported (golint)
    • chio/pkg/loaders/java_loader.go
    • Line 5: warning: exported type JavaFileLoader should have comment or be unexported (golint)
    • Line 8: warning: exported method JavaFileLoader.CountConcreteMembers should have comment or be unexported (golint)
    • Line 13: warning: exported method JavaFileLoader.CountAbstractMembers should have comment or be unexported (golint)
    • Line 18: warning: exported method JavaFileLoader.ReferenceToPaths should have comment or be unexported (golint)
    • Line 18: warning: receiver name g should be consistent with previous receiver name j for JavaFileLoader (golint)
    • chio/chio.go
    • Line 20: warning: exported type CommandParams should have comment or be unexported (golint)
    • chio/pkg/language_type.go
    • Line 5: warning: exported type LanguageType should have comment or be unexported (golint)
    • Line 8: warning: exported const GO should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function ValueOfLanguage should have comment or be unexported (golint)
    • Line 41: warning: exported method LanguageType.Extension should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!