Preparing report...

Report for github.com/flike/kingbus

A+    Excellent!    Found 8 issues across 63 files

Tweet

gofmt96%

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.

    • kingbus/mysql/trx_boundary_parser.go
    • Line 189: warning: cyclomatic complexity 35 of function (*TransactionBoundaryParser).UpdateState() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 17 of function (*TransactionBoundaryParser).GetEventBoundaryType() is high (> 15) (gocyclo)
    • kingbus/mysql/command.go
    • Line 451: warning: cyclomatic complexity 24 of function (*Conn).handleBinlogDumpGtid() is high (> 15) (gocyclo)
    • Line 305: warning: cyclomatic complexity 23 of function (*Conn).handleSet() is high (> 15) (gocyclo)

golint98%

Golint is a linter for Go source code.

    • kingbus/utils/sync_flile_range_linux.go
    • Line 22: warning: exported const SYNC_FILE_RANGE_WAIT_BEFORE should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function Syncfilerange should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • kingbus/mysql/command.go
    • Line 175: warning: ineffectual assignment to err (ineffassign)
    • Line 182: warning: ineffectual assignment to err (ineffassign)
    • Line 201: warning: ineffectual assignment to err (ineffassign)
    • Line 255: warning: ineffectual assignment to err (ineffassign)
    • Line 266: warning: ineffectual assignment to err (ineffassign)
    • Line 290: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!