Preparing report...

Report for github.com/tdex-network/tdex-analytics

(v0.0.0-20220304093118-600bb6651c2a)

A+    Excellent!    Found 25 issues across 49 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!


gocyclo100%

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.

No problems detected. Good job!


golint51%

Golint is a linter for Go source code.

    • internal/infrastructure/db/pg/postgres_db.go
    • Line 15: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 29: warning: exported type Service should have comment or be unexported (golint)
    • Line 36: warning: exported type Config should have comment or be unexported (golint)
    • Line 50: warning: exported function New should have comment or be unexported (golint)
    • Line 66: warning: exported type DbConfig should have comment or be unexported (golint)
    • pkg/hexerr/error.go
    • Line 14: warning: exported const InterfaceLayer should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Layer should have comment or be unexported (golint)
    • Line 28: warning: exported type Code should have comment or be unexported (golint)
    • Line 30: warning: exported type HexagonalError should have comment or be unexported (golint)
    • Line 39: warning: exported function NewInterfaceLayerError should have comment or be unexported (golint)
    • Line 54: warning: exported function NewApplicationLayerError should have comment or be unexported (golint)
    • Line 69: warning: exported function NewInfrastructureLayerError should have comment or be unexported (golint)
    • Line 84: warning: exported function NewDomainLayerError should have comment or be unexported (golint)
    • Line 103: warning: exported method HexagonalError.Details should have comment or be unexported (golint)
    • Line 113: warning: exported method HexagonalError.StackTrace should have comment or be unexported (golint)
    • test/application/test_setup.go
    • Line 30: warning: exported type AppSvcTestSuit should have comment or be unexported (golint)
    • Line 34: warning: exported method AppSvcTestSuit.SetupSuite should have comment or be unexported (golint)
    • Line 97: warning: exported method AppSvcTestSuit.TearDownSuite should have comment or be unexported (golint)
    • Line 101: warning: exported method AppSvcTestSuit.BeforeTest should have comment or be unexported (golint)
    • Line 107: warning: exported method AppSvcTestSuit.AfterTest should have comment or be unexported (golint)
    • test/influx-db/test_setup.go
    • Line 13: warning: exported type InfluxDBTestSuit should have comment or be unexported (golint)
    • Line 17: warning: exported method InfluxDBTestSuit.SetupSuite should have comment or be unexported (golint)
    • Line 36: warning: exported method InfluxDBTestSuit.TearDownSuite should have comment or be unexported (golint)
    • Line 40: warning: exported method InfluxDBTestSuit.BeforeTest should have comment or be unexported (golint)
    • Line 42: warning: exported method InfluxDBTestSuit.AfterTest should have comment or be unexported (golint)
    • internal/infrastructure/db/influx/influx_db.go
    • Line 10: warning: exported const MarketPriceTable should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported type Service should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • test/pg-db/test_setup.go
    • Line 21: warning: exported type PgDbTestSuite should have comment or be unexported (golint)
    • Line 25: warning: exported method PgDbTestSuite.SetupSuite should have comment or be unexported (golint)
    • Line 50: warning: exported method PgDbTestSuite.TearDownSuite should have comment or be unexported (golint)
    • Line 56: warning: exported method PgDbTestSuite.BeforeTest should have comment or be unexported (golint)
    • Line 62: warning: exported method PgDbTestSuite.AfterTest should have comment or be unexported (golint)
    • internal/core/application/types.go
    • Line 17: warning: exported const LastHour should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type MarketBalance should have comment or be unexported (golint)
    • Line 58: warning: exported type MarketPrice should have comment or be unexported (golint)
    • Line 123: warning: exported type MarketsBalances should have comment or be unexported (golint)
    • Line 128: warning: exported type Balance should have comment or be unexported (golint)
    • Line 136: warning: exported type MarketsPrices should have comment or be unexported (golint)
    • Line 141: warning: exported type Price should have comment or be unexported (golint)
    • Line 149: warning: exported type TimeRange should have comment or be unexported (golint)
    • Line 184: warning: exported type PredefinedPeriod should have comment or be unexported (golint)
    • Line 197: warning: exported type CustomPeriod should have comment or be unexported (golint)
    • Line 253: warning: exported type MarketRequest should have comment or be unexported (golint)
    • pkg/tdex-market-loader/client.go
    • Line 28: warning: exported type Service should have comment or be unexported (golint)
    • Line 40: warning: exported function NewService should have comment or be unexported (golint)
    • Line 228: warning: exported type Market should have comment or be unexported (golint)
    • Line 234: warning: exported type LiquidityProvider should have comment or be unexported (golint)
    • Line 291: warning: exported type Balance should have comment or be unexported (golint)
    • Line 296: warning: exported type Price should have comment or be unexported (golint)
    • internal/config/config.go
    • Line 11: warning: exported const InfluxDbOrg should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported function GetBool should have comment or be unexported (golint)
    • Line 65: warning: exported function GetString should have comment or be unexported (golint)
    • Line 69: warning: exported function GetInt should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!