Preparing report...

Report for github.com/JustKeepSilence/gdb

A+    Excellent!    Found 13 issues across 23 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!


gocyclo86%

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.

    • gdb/db/ldb.go
    • Line 28: warning: cyclomatic complexity 17 of function (*Gdb).BatchWrite() is high (> 15) (gocyclo)
    • Line 524: warning: cyclomatic complexity 16 of function (*Gdb).getHistoricalDataWithStampAndDeadZoneCount() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 16 of function (*Gdb).GetRealTimeData() is high (> 15) (gocyclo)
    • Line 114: warning: cyclomatic complexity 16 of function (*Gdb).BatchWriteHistoricalData() is high (> 15) (gocyclo)
    • gdb/db/web.go
    • Line 898: warning: cyclomatic complexity 43 of function (*Gdb).calc() is high (> 15) (gocyclo)

golint52%

Golint is a linter for Go source code.

    • gdb/cmap/cmap.go
    • Line 41: warning: exported method ConcurrentMap.MSet should have comment or be unexported (golint)
    • gdb/examples/examples.go
    • Line 20: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/examples/service_examples.go
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 46: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/db/item.go
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 165: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/db/ldb.go
    • Line 13: warning: should not use dot imports (golint)
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 107: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 120: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 176: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 183: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 195: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 218: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 225: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 232: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 246: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 260: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 311: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 319: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 334: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 361: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 369: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 380: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 409: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 417: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 450: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 480: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 486: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 510: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 519: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 549: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 588: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 596: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 649: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 658: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 702: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 710: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 713: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 722: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 725: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 734: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 737: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 780: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 821: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 842: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 849: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 856: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 870: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/db/db_type.go
    • Line 106: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 135: warning: exported function NewGdb should have comment or be unexported (golint)
    • gdb/db/group.go
    • Line 12: warning: should not use dot imports (golint)
    • Line 303: warning: exported method Gdb.CleanGroupItems should have comment or be unexported (golint)
    • Line 310: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/db/sqlite.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 134: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 162: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gdb/db/struture.go
    • Line 22: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported type GdbConfigs should have comment or be unexported (golint)
    • Line 38: warning: exported type LogConfigs should have comment or be unexported (golint)
    • Line 44: warning: exported type HttpsConfigs should have comment or be unexported (golint)
    • Line 59: warning: exported type Rows should have comment or be unexported (golint)
    • Line 63: warning: exported type Cols should have comment or be unexported (golint)
    • Line 69: warning: exported type AddedGroupInfo should have comment or be unexported (golint)
    • Line 74: warning: exported type AddedGroupInfos should have comment or be unexported (golint)
    • Line 78: warning: exported type GroupNamesInfo should have comment or be unexported (golint)
    • Line 82: warning: exported type GroupPropertyInfo should have comment or be unexported (golint)
    • Line 92: warning: exported type UpdatedGroupNameInfo should have comment or be unexported (golint)
    • Line 97: warning: exported type UpdatedGroupNamesInfo should have comment or be unexported (golint)
    • Line 101: warning: exported type UpdatedGroupColumnNamesInfo should have comment or be unexported (golint)
    • Line 107: warning: exported type DeletedGroupColumnNamesInfo should have comment or be unexported (golint)
    • Line 112: warning: exported type AddedGroupColumnsInfo should have comment or be unexported (golint)
    • Line 120: warning: exported type AddedItemsInfo should have comment or be unexported (golint)
    • Line 125: warning: exported type DeletedItemsInfo should have comment or be unexported (golint)
    • Line 130: warning: exported type ItemsInfo should have comment or be unexported (golint)
    • Line 138: warning: exported type UpdatedItemsInfo should have comment or be unexported (golint)
    • Line 144: warning: exported type GdbItems should have comment or be unexported (golint)
    • Line 153: warning: exported type CheckItemsInfo should have comment or be unexported (golint)
    • Line 160: warning: exported type ItemValue should have comment or be unexported (golint)
    • Line 166: warning: exported type HistoricalItemValue should have comment or be unexported (golint)
    • Line 211: warning: exported type DeadZone should have comment or be unexported (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!


misspell95%

Misspell Finds commonly misspelled English words