Skip to content

refactor!: code optimization as stricter linters are in place #583

refactor!: code optimization as stricter linters are in place

refactor!: code optimization as stricter linters are in place #583

Triggered via pull request April 19, 2024 03:54
Status Failure
Total duration 40s
Artifacts

lint.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
Lint: internal/service/indexer/l2/indexer.go#L234
cognitive complexity 31 of func `(*server).indexBlock` is high (> 30) (gocognit)
Lint: internal/service/scheduler/snapshot/staker_profit/staker_profit.go#L103
cognitive complexity 36 of func `(*server).saveStakerProfitSnapshots` is high (> 30) (gocognit)
Lint: internal/service/scheduler/snapshot/node_min_tokens_to_stake/node_min_tokens_to_stake.go#L98
cognitive complexity 33 of func `(*server).saveMinTokensToStakeSnapshots` is high (> 30) (gocognit)
Lint: internal/service/settler/server.go#L74
cognitive complexity 33 of func `(*Server).listenEpochEvent` is high (> 30) (gocognit)
Lint: common/geolite2/client_test.go#L3
commentFormatting: put a space between `//` and comment text (gocritic)
Lint: internal/service/hub/handler/dsl/router/router_test.go#L207
commentFormatting: put a space between `//` and comment text (gocritic)
Lint: internal/service/hub/model/nta/stake_transaction.go#L122
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
Lint: internal/service/hub/model/nta/stake_transaction.go#L134
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
Lint: internal/service/hub/handler/dsl/enforcer/handle_response.go#L29
ifElseChain: rewrite if-else to switch statement (gocritic)
Lint: internal/service/hub/handler/dsl/enforcer/handle_response.go#L210
ifElseChain: rewrite if-else to switch statement (gocritic)
Lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-go@v3, golangci/golangci-lint-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.