Skip to content

chore: fixes a batch of lint issues#282

Merged
Thaleszh merged 3 commits into
feat/bump-evm-v0.6.0from
chore/lint
Mar 6, 2026
Merged

chore: fixes a batch of lint issues#282
Thaleszh merged 3 commits into
feat/bump-evm-v0.6.0from
chore/lint

Conversation

@Thaleszh

@Thaleszh Thaleszh commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Description

Applies linting

Type of change

  • chore (Updates on dependencies, gitignore, etc)

@Thaleszh Thaleszh requested a review from jhelison as a code owner March 6, 2026 00:43
@coderabbitai

coderabbitai Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 845d94bb-75ff-4a47-823c-47dbda4f3167

📥 Commits

Reviewing files that changed from the base of the PR and between 05a4e0b and b731d45.

📒 Files selected for processing (2)
  • .golangci.yml
  • Makefile

Walkthrough

This pull request primarily adds //nolint:staticcheck annotations across multiple files (module implementation assertions and test assertions). It also updates simulation and command calls: replaces SimulationOperations(...) with BuildSimulationOperations(..., txConfig) in app/sim_test.go, and replaces genutilcli.GenesisCoreCommand(...) with genutilcli.Commands(...) in cmd/kiichaind/cmd/root.go. Additionally, it removes MustSortJSON usage from JSON marshaling in x/tokenfactory (test helpers and GetSignBytes implementations). Minor tooling updates: Go version added to .golangci.yml and Makefile install uses GOTOOLCHAIN=go1.24.11.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: fixes a batch of lint issues' accurately summarizes the main changes: widespread addition of staticcheck suppression comments and adjustments to linting configuration.
Description check ✅ Passed The description 'Applies linting' is directly related to the changeset, which comprehensively addresses linting concerns through lint suppression comments and linting configuration updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/lint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
tests/e2e/e2e_bank_test.go (1)

61-62: Replace IsEqual instead of silencing it.

These assertions still use sdk.Coin.IsEqual, which is deprecated. If you materialize the expected coin in a local variable first, you can compare with Coin.Equal and drop the //nolint:staticcheck markers entirely; Equal is a pointer-receiver method, so it can't be called directly on the chained Sub/Add result. (pkg.go.dev)

Suggested pattern
-				decremented := beforeAliceAKiiBalance.Sub(tokenAmount).Sub(standardFees).IsEqual(afterAliceAKiiBalance) //nolint:staticcheck
-				incremented := beforeBobAkiiBalance.Add(tokenAmount).IsEqual(afterBobUAKiiBalance) //nolint:staticcheck
+				expectedAlice := beforeAliceAKiiBalance.Sub(tokenAmount).Sub(standardFees)
+				expectedBob := beforeBobAkiiBalance.Add(tokenAmount)
+				decremented := expectedAlice.Equal(afterAliceAKiiBalance)
+				incremented := expectedBob.Equal(afterBobUAKiiBalance)

Apply the same pattern to the multi-send assertion below.

Also applies to: 87-89

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/e2e/e2e_bank_test.go` around lines 61 - 62, The test uses the
deprecated sdk.Coin.IsEqual with chained Sub/Add results and silences the
linter; instead, compute the expected coins into local variables (e.g.
expectedAlice := beforeAliceAKiiBalance.Sub(tokenAmount).Sub(standardFees) and
expectedBob := beforeBobAkiiBalance.Add(tokenAmount)), then call the
pointer-receiver method Equal on the resulting coins
(expectedAlice.Equal(&afterAliceAKiiBalance) or
expectedAlice.Equal(&afterAliceAKiiBalance) as appropriate) and remove the
//nolint:staticcheck markers; apply the same pattern for the multi-send
assertions around the later lines.
tests/e2e/e2e_gov_test.go (1)

128-128: Use Coin.Equal here too.

sdk.Coin.IsEqual is deprecated, so this line is just hiding the SDK warning. Build the expected post-proposal balance first and compare with Equal instead. (pkg.go.dev)

Suggested cleanup
-			return afterRecipientBalance.Sub(sendAmount).IsEqual(beforeRecipientBalance) //nolint:staticcheck
+			expectedRecipientBalance := beforeRecipientBalance.Add(sendAmount)
+			return expectedRecipientBalance.Equal(afterRecipientBalance)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/e2e/e2e_gov_test.go` at line 128, Replace the deprecated
sdk.Coin.IsEqual usage: compute the expected post-send balance by calling
beforeRecipientBalance.Add(sendAmount) (store in a variable like
expectedAfterRecipientBalance) and then compare with Equal, i.e. return
afterRecipientBalance.Equal(expectedAfterRecipientBalance); reference the
variables afterRecipientBalance, beforeRecipientBalance, sendAmount and the
Coin.Equal method.
app/modules.go (1)

94-95: Keep the suppression off the whole module list.

These two //nolint:staticcheck annotations now live on the helper that aggregates every module. Hiding the deprecated SDK type behind a one-line local alias would keep the suppression contained and leave the actual module list fully linted. module.AppModule is deprecated in the SDK. (pkg.go.dev)

One way to contain the suppression
+type legacyAppModule = module.AppModule //nolint:staticcheck
+
 func appModules(
 	app *KiichainApp,
 	appCodec codec.Codec,
 	txConfig client.TxEncodingConfig,
 	tmLightClientModule ibctm.LightClientModule,
-) []module.AppModule { //nolint:staticcheck
-	return []module.AppModule{ //nolint:staticcheck
+) []legacyAppModule {
+	return []legacyAppModule{
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/modules.go` around lines 94 - 95, The module list currently suppresses
staticcheck at the return type (return []module.AppModule{
//nolint:staticcheck), which hides use of the deprecated SDK type for the entire
list; instead, create a one-line local alias for the deprecated type (e.g.,
define a local type name that equals module.AppModule) and attach the
//nolint:staticcheck to that alias declaration, then change the function
signature/return to use the new local alias for the slice (and remove the inline
//nolint from the literal), so the suppression is contained to the alias while
the actual module list remains fully linted.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/modules.go`:
- Around line 94-95: The module list currently suppresses staticcheck at the
return type (return []module.AppModule{ //nolint:staticcheck), which hides use
of the deprecated SDK type for the entire list; instead, create a one-line local
alias for the deprecated type (e.g., define a local type name that equals
module.AppModule) and attach the //nolint:staticcheck to that alias declaration,
then change the function signature/return to use the new local alias for the
slice (and remove the inline //nolint from the literal), so the suppression is
contained to the alias while the actual module list remains fully linted.

In `@tests/e2e/e2e_bank_test.go`:
- Around line 61-62: The test uses the deprecated sdk.Coin.IsEqual with chained
Sub/Add results and silences the linter; instead, compute the expected coins
into local variables (e.g. expectedAlice :=
beforeAliceAKiiBalance.Sub(tokenAmount).Sub(standardFees) and expectedBob :=
beforeBobAkiiBalance.Add(tokenAmount)), then call the pointer-receiver method
Equal on the resulting coins (expectedAlice.Equal(&afterAliceAKiiBalance) or
expectedAlice.Equal(&afterAliceAKiiBalance) as appropriate) and remove the
//nolint:staticcheck markers; apply the same pattern for the multi-send
assertions around the later lines.

In `@tests/e2e/e2e_gov_test.go`:
- Line 128: Replace the deprecated sdk.Coin.IsEqual usage: compute the expected
post-send balance by calling beforeRecipientBalance.Add(sendAmount) (store in a
variable like expectedAfterRecipientBalance) and then compare with Equal, i.e.
return afterRecipientBalance.Equal(expectedAfterRecipientBalance); reference the
variables afterRecipientBalance, beforeRecipientBalance, sendAmount and the
Coin.Equal method.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 98388eee-1129-407f-9c4d-9a5f5fb1c088

📥 Commits

Reviewing files that changed from the base of the PR and between 6e20320 and 05a4e0b.

📒 Files selected for processing (13)
  • app/modules.go
  • app/sim_test.go
  • cmd/kiichaind/cmd/root.go
  • tests/e2e/e2e_bank_test.go
  • tests/e2e/e2e_gov_test.go
  • tests/e2e/e2e_ibc_test.go
  • x/feeabstraction/module.go
  • x/oracle/module.go
  • x/rewards/module.go
  • x/tokenfactory/keeper/createdenom_test.go
  • x/tokenfactory/module.go
  • x/tokenfactory/testhelpers/authz.go
  • x/tokenfactory/types/msgs.go

@codecov

codecov Bot commented Mar 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
x/tokenfactory/types/msgs.go 0.00% 7 Missing ⚠️
x/tokenfactory/testhelpers/authz.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Thaleszh Thaleszh changed the base branch from main to feat/bump-evm-v0.6.0 March 6, 2026 14:13
@Thaleszh Thaleszh merged commit 0e0c948 into feat/bump-evm-v0.6.0 Mar 6, 2026
8 of 10 checks passed
@Thaleszh Thaleszh deleted the chore/lint branch March 6, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant