Preparing report...

Report for github.com/BruceDu521/soar

(v0.11.0)

A+    Excellent!    Found 14 issues across 63 files

Tweet

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!


gofmt98%

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


gocyclo79%

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.

    • advisor/rules.go
    • Line 1250: warning: cyclomatic complexity 55 of function FormatSuggest() is high (> 15) (gocyclo)
    • Line 1502: warning: cyclomatic complexity 19 of function formatJSON() is high (> 15) (gocyclo)
    • database/explain.go
    • Line 638: warning: cyclomatic complexity 27 of function ExplainInfoTranslator() is high (> 15) (gocyclo)
    • Line 866: warning: cyclomatic complexity 22 of function parseVerticalExplainText() is high (> 15) (gocyclo)
    • ast/tidb.go
    • Line 116: warning: cyclomatic complexity 22 of function SchemaMetaInfo() is high (> 15) (gocyclo)
    • ast/token.go
    • Line 854: warning: cyclomatic complexity 52 of function SplitStatement() is high (> 15) (gocyclo)
    • Line 622: warning: cyclomatic complexity 30 of function getNextToken() is high (> 15) (gocyclo)
    • advisor/heuristic.go
    • Line 161: warning: cyclomatic complexity 33 of function (*IndexAdvisor).RuleImplicitConversion() is high (> 15) (gocyclo)
    • Line 1276: warning: cyclomatic complexity 27 of function (*Query4Audit).RuleMeaninglessWhere() is high (> 15) (gocyclo)
    • Line 3154: warning: cyclomatic complexity 27 of function (*Query4Audit).RuleTimestampDefault() is high (> 15) (gocyclo)
    • Line 3548: warning: cyclomatic complexity 25 of function (*Query4Audit).RuleIntPrecision() is high (> 15) (gocyclo)
    • Line 3251: warning: cyclomatic complexity 24 of function (*Query4Audit).RuleColumnWithCharset() is high (> 15) (gocyclo)
    • Line 3320: warning: cyclomatic complexity 22 of function (*Query4Audit).RuleTableCharsetCheck() is high (> 15) (gocyclo)
    • Line 3435: warning: cyclomatic complexity 22 of function (*Query4Audit).RuleTableCollateCheck() is high (> 15) (gocyclo)
    • Line 549: warning: cyclomatic complexity 21 of function (*Query4Audit).RuleDiffGroupByOrderBy() is high (> 15) (gocyclo)
    • Line 3830: warning: cyclomatic complexity 20 of function (*Query4Audit).RuleAllowEngine() is high (> 15) (gocyclo)
    • Line 1841: warning: cyclomatic complexity 20 of function (*Query4Audit).RuleImpreciseDataType() is high (> 15) (gocyclo)
    • Line 3913: warning: cyclomatic complexity 19 of function (*Query4Audit).RuleAutoIncUnsigned() is high (> 15) (gocyclo)
    • Line 2893: warning: cyclomatic complexity 19 of function (*Query4Audit).RuleBLOBNotNull() is high (> 15) (gocyclo)
    • Line 3499: warning: cyclomatic complexity 19 of function (*Query4Audit).RuleBlobDefaultValue() is high (> 15) (gocyclo)
    • Line 824: warning: cyclomatic complexity 18 of function (*Query4Audit).RuleAddDefaultValue() is high (> 15) (gocyclo)
    • advisor/index.go
    • Line 768: warning: cyclomatic complexity 31 of function CompleteColumnsInfo() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 27 of function (*IndexAdvisor).IndexAdvise() is high (> 15) (gocyclo)
    • Line 1064: warning: cyclomatic complexity 20 of function DuplicateKeyChecker() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 17 of function (*IndexAdvisor).mergeIndexes() is high (> 15) (gocyclo)
    • env/env.go
    • Line 235: warning: cyclomatic complexity 29 of function (*VirtualEnv).BuildVirtualEnv() is high (> 15) (gocyclo)
    • common/meta.go
    • Line 290: warning: cyclomatic complexity 22 of function numericStorageReq() is high (> 15) (gocyclo)
    • Line 356: warning: cyclomatic complexity 16 of function timeStorageReq() is high (> 15) (gocyclo)
    • ast/pretty.go
    • Line 53: warning: cyclomatic complexity 81 of function format() is high (> 15) (gocyclo)
    • ast/rewrite.go
    • Line 396: warning: cyclomatic complexity 60 of function omitAlwaysTrue() is high (> 15) (gocyclo)
    • Line 1367: warning: cyclomatic complexity 30 of function (*Rewrite).sub2Join() is high (> 15) (gocyclo)
    • Line 988: warning: cyclomatic complexity 20 of function mergeExprs() is high (> 15) (gocyclo)
    • Line 911: warning: cyclomatic complexity 20 of function (*NodeItem).or2in() is high (> 15) (gocyclo)
    • Line 1157: warning: cyclomatic complexity 19 of function (*Rewrite).rmParenthesis() is high (> 15) (gocyclo)
    • Line 1096: warning: cyclomatic complexity 16 of function removeDup() is high (> 15) (gocyclo)
    • Line 759: warning: cyclomatic complexity 16 of function (*Rewrite).RewriteInsertColumns() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!