Skip to content

improvements: clean code #64

improvements: clean code

improvements: clean code #64

GitHub Actions / GolangCI Lint failed Dec 1, 2023 in 0s

reviewdog [GolangCI Lint] report

reported by reviewdog 🐶

Findings (5)

pkg/collector/ibc_collector.go|70 col 2| assignments should only be cuddled with other assignments (wsl)
pkg/collector/ibc_collector.go|71 col 2| declarations should never be cuddled (wsl)
pkg/collector/wallet_balance_collector.go|19| File is not gofumpt-ed with -extra (gofumpt)
pkg/collector/wallet_balance_collector.go|38 col 2| declarations should never be cuddled (wsl)
pkg/collector/wallet_balance_collector.go|39 col 2| assignments should only be cuddled with other assignments (wsl)

Filtered Findings (2)

pkg/config/config.go|22| File is not gofumpt-ed with -extra (gofumpt)
pkg/config/config.go|202 col 4| only one cuddle assignment allowed before if statement (wsl)

Annotations

Check failure on line 70 in pkg/collector/ibc_collector.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/collector/ibc_collector.go#L70

assignments should only be cuddled with other assignments (wsl)
Raw output
pkg/collector/ibc_collector.go:70:2: assignments should only be cuddled with other assignments (wsl)
	ctx := context.Background()
	^

Check failure on line 71 in pkg/collector/ibc_collector.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/collector/ibc_collector.go#L71

declarations should never be cuddled (wsl)
Raw output
pkg/collector/ibc_collector.go:71:2: declarations should never be cuddled (wsl)
	var wg sync.WaitGroup
	^

Check failure on line 19 in pkg/collector/wallet_balance_collector.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/collector/wallet_balance_collector.go#L19

File is not `gofumpt`-ed with `-extra` (gofumpt)
Raw output
pkg/collector/wallet_balance_collector.go:19: File is not `gofumpt`-ed with `-extra` (gofumpt)
var (
	walletBalance = prometheus.NewDesc(
		walletBalanceMetricName,
		"Returns wallet balance for an address on a chain.",
		[]string{"account", "chain_id", "denom", "status"}, nil,
	)

Check failure on line 38 in pkg/collector/wallet_balance_collector.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/collector/wallet_balance_collector.go#L38

declarations should never be cuddled (wsl)
Raw output
pkg/collector/wallet_balance_collector.go:38:2: declarations should never be cuddled (wsl)
	var wg sync.WaitGroup
	^

Check failure on line 39 in pkg/collector/wallet_balance_collector.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/collector/wallet_balance_collector.go#L39

assignments should only be cuddled with other assignments (wsl)
Raw output
pkg/collector/wallet_balance_collector.go:39:2: assignments should only be cuddled with other assignments (wsl)
	ctx := context.Background()
	^