Preparing report...

Report for github.com/daoleno/uniswapv3-sdk

A    Great!    Found 13 issues across 14 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!


gocyclo71%

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.


golint14%

Golint is a linter for Go source code.

    • uniswapv3-sdk/constants/constants.go
    • Line 11: warning: exported const PoolInitCodeHash should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported var FactoryAddress should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type FeeAmount should be of the form "FeeAmount ..." (with optional leading article) (golint)
    • Line 24: warning: exported const FeeLow should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: comment on exported var TickSpaces should be of the form "TickSpaces ..." (golint)
    • Line 38: warning: exported var NegativeOne should have comment or be unexported (golint)
    • Line 42: warning: comment on exported var Q96 should be of the form "Q96 ..." (golint)
    • uniswapv3-sdk/utils/sqrtprice_math.go
    • Line 12: warning: exported var ErrSqrtPriceLessThanZero should have comment or be unexported (golint)
    • Line 16: warning: exported var MaxUint160 should have comment or be unexported (golint)
    • Line 28: warning: exported function GetAmount0Delta should have comment or be unexported (golint)
    • Line 42: warning: exported function GetAmount1Delta should have comment or be unexported (golint)
    • Line 53: warning: exported function GetNextSqrtPriceFromInput should have comment or be unexported (golint)
    • Line 66: warning: exported function GetNextSqrtPriceFromOutput should have comment or be unexported (golint)
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • uniswapv3-sdk/utils/tick_math.go
    • Line 12: warning: exported const MinTick should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported var Q32 should have comment or be unexported (golint)
    • Line 23: warning: exported var ErrInvalidTick should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function GetSqrtRatioAtTick should be of the form "GetSqrtRatioAtTick ..." (golint)
    • Line 117: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 122: warning: comment on exported function GetTickAtSqrtRatio should be of the form "GetTickAtSqrtRatio ..." (golint)
    • Line 170: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • uniswapv3-sdk/entities/pool.go
    • Line 14: warning: exported var ErrFeeTooHigh should have comment or be unexported (golint)
    • Line 21: warning: exported type StepComputations should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type Pool should be of the form "Pool ..." (with optional leading article) (golint)
    • Line 45: warning: exported function GetAddress should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function NewPool should be of the form "NewPool ..." (golint)
    • Line 98: warning: comment on exported method Pool.InvolvesToken should be of the form "InvolvesToken ..." (golint)
    • Line 125: warning: comment on exported method Pool.PriceOf should be of the form "PriceOf ..." (golint)
    • Line 140: warning: comment on exported method Pool.ChainID should be of the form "ChainID ..." (golint)
    • Line 145: warning: comment on exported method Pool.GetOutputAmount should be of the form "GetOutputAmount ..." (golint)
    • Line 172: warning: comment on exported method Pool.GetInputAmount should be of the form "GetInputAmount ..." (golint)
    • uniswapv3-sdk/entities/route.go
    • Line 10: warning: exported var ErrRouteNoPools should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function NewRoute should be of the form "NewRoute ..." (golint)
    • Line 78: warning: exported method Route.ChainID should have comment or be unexported (golint)
    • uniswapv3-sdk/entities/trade.go
    • Line 14: warning: exported var ErrTradeHasMultipleRoutes should have comment or be unexported (golint)
    • Line 58: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: comment on exported type Trade should be of the form "Trade ..." (with optional leading article) (golint)
    • Line 90: warning: exported type Swap should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method Trade.Route should be of the form "Route ..." (golint)
    • Line 172: warning: comment on exported function ExactIn should be of the form "ExactIn ..." (golint)
    • Line 184: warning: comment on exported function ExactOut should be of the form "ExactOut ..." (golint)
    • Line 196: warning: comment on exported function FromRoute should be of the form "FromRoute ..." (golint)
    • Line 252: warning: exported type WrappedRoute should have comment or be unexported (golint)
    • Line 257: warning: comment on exported function FromRoutes should be of the form "FromRoutes ..." (golint)
    • Line 317: warning: comment on exported function CreateUncheckedTrade should be of the form "CreateUncheckedTrade ..." (golint)
    • Line 334: warning: comment on exported function CreateUncheckedTradeWithMultipleRoutes should be of the form "CreateUncheckedTradeWithMultipleRoutes ..." (golint)
    • Line 390: warning: comment on exported method Trade.MinimumAmountOut should be of the form "MinimumAmountOut ..." (golint)
    • Line 401: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 410: warning: comment on exported method Trade.MaximumAmountIn should be of the form "MaximumAmountIn ..." (golint)
    • Line 421: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 429: warning: comment on exported method Trade.WorstExecutionPrice should be of the form "WorstExecutionPrice ..." (golint)
    • Line 446: warning: exported type BestTradeOptions should have comment or be unexported (golint)
    • Line 451: warning: comment on exported function BestTradeExactIn should be of the form "BestTradeExactIn ..." (golint)
    • Line 525: warning: comment on exported function BestTradeExactOut should be of the form "BestTradeExactOut ..." (golint)

license0%

Checks whether your project has a LICENSE file.


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!