Preparing report...

Report for github.com/mitoteam/mysqlann

D    Needs lots of improvement    Found 11 issues across 11 files

Tweet

gofmt9%

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.


golint0%

Golint is a linter for Go source code.

    • mysqlann/DeleteQuery.go
    • Line 10: warning: don't use underscores in Go names; struct field table_name should be tableName (golint)
    • Line 13: warning: exported function Delete should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mysqlann/UpdateQuery.go
    • Line 11: warning: don't use underscores in Go names; struct field table_name should be tableName (golint)
    • Line 14: warning: exported function Update should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
    • Line 22: warning: don't use underscores in Go names; method parameter field_name should be fieldName (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mysqlann/queryWithFieldsValues.go
    • Line 7: warning: don't use underscores in Go names; struct field field_values should be fieldValues (golint)
    • Line 21: warning: don't use underscores in Go names; method parameter field_name should be fieldName (golint)
    • Line 42: warning: don't use underscores in Go names; range var field_name should be fieldName (golint)
    • Line 42: warning: should omit 2nd value from range; this loop is equivalent to `for field_name := range ...` (golint)
    • Line 68: warning: don't use underscores in Go names; range var field_name should be fieldName (golint)
    • mysqlann/run.go
    • Line 10: warning: exported function SetDB should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func parameter new_db should be newDb (golint)
    • Line 43: warning: don't use underscores in Go names; var column_types should be columnTypes (golint)
    • Line 46: warning: don't use underscores in Go names; var str_data should be strData (golint)
    • Line 49: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 63: warning: don't use underscores in Go names; var column_types should be columnTypes (golint)
    • Line 64: warning: don't use underscores in Go names; var column_type should be columnType (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 72: warning: don't use underscores in Go names; var str_data should be strData (golint)
    • Line 81: warning: don't use underscores in Go names; var column_types should be columnTypes (golint)
    • Line 84: warning: don't use underscores in Go names; var str_data should be strData (golint)
    • Line 87: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • mysqlann/InsertQuery.go
    • Line 10: warning: don't use underscores in Go names; struct field table_name should be tableName (golint)
    • Line 13: warning: exported function Insert should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
    • Line 21: warning: don't use underscores in Go names; method parameter field_name should be fieldName (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mysqlann/QueryTable.go
    • Line 13: warning: don't use underscores in Go names; method parameter field_name should be fieldName (golint)
    • Line 13: warning: don't use underscores in Go names; method parameter field_alias should be fieldAlias (golint)
    • mysqlann/SelectQuery.go
    • Line 22: warning: exported function Select should have comment or be unexported (golint)
    • Line 22: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
    • Line 42: warning: don't use underscores in Go names; method parameter table_name should be tableName (golint)
    • Line 53: warning: don't use underscores in Go names; range var field_name should be fieldName (golint)
    • Line 154: warning: don't use underscores in Go names; var f_cnt should be fCnt (golint)
    • Line 157: warning: don't use underscores in Go names; var f_cnt should be fCnt (golint)
    • Line 161: warning: don't use underscores in Go names; var field_expressions should be fieldExpressions (golint)
    • Line 169: warning: don't use underscores in Go names; range var field_alias should be fieldAlias (golint)
    • Line 169: warning: don't use underscores in Go names; range var field_name should be fieldName (golint)
    • mysqlann/queryCondition.go
    • Line 5: warning: exported type ConditionGlueOperator should have comment or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; struct field string_conditions should be stringConditions (golint)
    • Line 17: warning: don't use underscores in Go names; struct field sub_conditions should be subConditions (golint)
    • Line 20: warning: exported function And should have comment or be unexported (golint)
    • Line 30: warning: exported function Or should have comment or be unexported (golint)
    • Line 103: warning: don't use underscores in Go names; var cooked_string_conditions should be cookedStringConditions (golint)
    • Line 106: warning: don't use underscores in Go names; range var string_condition should be stringCondition (golint)
    • Line 122: warning: don't use underscores in Go names; range var string_condition should be stringCondition (golint)
    • mysqlann/types.go
    • Line 8: warning: comment on exported type Anything should be of the form "Anything ..." (with optional leading article) (golint)
    • Line 11: warning: exported function AnythingToSql should have comment or be unexported (golint)
    • Line 24: warning: exported function AnythingToString should have comment or be unexported (golint)
    • Line 34: warning: comment on exported type Query should be of the form "Query ..." (with optional leading article) (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!