Skip to content

improvements: clean code #67

improvements: clean code

improvements: clean code #67

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

reviewdog [GolangCI Lint] report

reported by reviewdog 🐶

Findings (9)

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)
pkg/config/config.go|232 col 29| Error return value of validate.RegisterValidation is not checked (errcheck)
pkg/config/config.go|234 col 3| var-naming: don't use underscores in Go names; var val_arr should be valArr (revive)
pkg/config/config.go|249| File is not gofumpt-ed with -extra (gofumpt)
pkg/config/config.go|250 col 2| block should not end with a whitespace (or comment) (wsl)

Filtered Findings (2)

pkg/config/config.go|24| File is not gofumpt-ed with -extra (gofumpt)
pkg/config/config.go|204 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()
	^

Check failure on line 232 in pkg/config/config.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/config/config.go#L232

Error return value of `validate.RegisterValidation` is not checked (errcheck)
Raw output
pkg/config/config.go:232:29: Error return value of `validate.RegisterValidation` is not checked (errcheck)
	validate.RegisterValidation("has_port", func(fl validator.FieldLevel) bool {
	                           ^

Check failure on line 234 in pkg/config/config.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/config/config.go#L234

var-naming: don't use underscores in Go names; var val_arr should be valArr (revive)
Raw output
pkg/config/config.go:234:3: var-naming: don't use underscores in Go names; var val_arr should be valArr (revive)
		val_arr := strings.Split(val, ":")
		^

Check failure on line 249 in pkg/config/config.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/config/config.go#L249

File is not `gofumpt`-ed with `-extra` (gofumpt)
Raw output
pkg/config/config.go:249: File is not `gofumpt`-ed with `-extra` (gofumpt)

Check failure on line 250 in pkg/config/config.go

See this annotation in the file changed.

@github-actions github-actions / GolangCI Lint

[GolangCI Lint] pkg/config/config.go#L250

block should not end with a whitespace (or comment) (wsl)
Raw output
pkg/config/config.go:250:2: block should not end with a whitespace (or comment) (wsl)
	}
	^