Preparing report...

Report for github.com/victorien-a/gen-model

(v1.0.0)

D    Needs lots of improvement    Found 11 issues across 11 files

Tweet

gofmt0%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo90%

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.

    • handler/mysql.go
    • Line 33: warning: cyclomatic complexity 20 of function mysqlTypeToGoType() is high (> 15) (gocyclo)

golint27%

Golint is a linter for Go source code.

    • cmd/root.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 36: warning: exported var CmdRequest should have comment or be unexported (golint)
    • Line 74: warning: comment on exported function InitConfig should be of the form "InitConfig ..." (golint)
    • handler/cmdRequest.go
    • Line 15: warning: exported type CmdRequest should have comment or be unexported (golint)
    • Line 101: warning: exported method CmdRequest.SetDataByViper should have comment or be unexported (golint)
    • Line 114: warning: receiver name cmdRequest should be consistent with previous receiver name g for CmdRequest (golint)
    • Line 151: warning: receiver name cmdRequest should be consistent with previous receiver name g for CmdRequest (golint)
    • Line 166: warning: exported method CmdRequest.CreateModelStruct should have comment or be unexported (golint)
    • handler/dao.go
    • Line 8: warning: exported type SchemaColumn should have comment or be unexported (golint)
    • Line 15: warning: exported method SchemaColumn.TableName should have comment or be unexported (golint)
    • Line 19: warning: exported method SchemaColumn.IsNull should have comment or be unexported (golint)
    • Line 23: warning: exported type SchemaTable should have comment or be unexported (golint)
    • Line 28: warning: exported method SchemaTable.TableName should have comment or be unexported (golint)
    • handler/helper.go
    • Line 86: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 103: warning: exported function Welcome should have comment or be unexported (golint)
    • Line 117: warning: exported function PrintErrorMsg should have comment or be unexported (golint)
    • handler/mysql.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • handler/yaml.go
    • Line 13: warning: exported var YamlFile should have comment or be unexported (golint)
    • Line 14: warning: exported var YamlMap should have comment or be unexported (golint)
    • Line 15: warning: exported var YamlExt should have comment or be unexported (golint)
    • Line 29: warning: exported function GenConfigYaml should have comment or be unexported (golint)
    • cmd/create.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • cmd/init.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (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!