Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linter settings and update imports #1938

Merged
merged 6 commits into from
Apr 18, 2024
Merged

Conversation

Taztingo
Copy link
Contributor

@Taztingo Taztingo commented Apr 17, 2024

Description

A lot of changes were made to support SDK v0.50 and we have not linted anything yet. This updates our linter settings and fixes the imports in our source. A separate PR will be made that lints the actual code.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

Summary by CodeRabbit

  • Chores

    • Optimized import ordering for maintainability and consistency.
    • Updated import paths and removed redundant imports for smoother module integration.
  • Documentation

    • Updated CHANGELOG.md to reflect linter settings and import adjustments.

These changes aim to enhance code quality and maintain consistency in the project.

Copy link
Contributor

coderabbitai bot commented Apr 17, 2024

Walkthrough

The update involves a comprehensive restructuring of import statements across various files in the project to enhance code organization and maintainability. It includes adding new imports, removing redundant ones, and reordering imports to adhere to updated linter settings. These changes aim to streamline the codebase and improve its overall quality.

Changes

Files Change Summary
Various files in x/..., cmd/provenanced/cmd/..., and app/... directories Reorganized import statements, including additions, removals, and reordering for consistency and readability.
.golangci.yml Updated govet setting and added multiple new imports as listed in the changelog.
CHANGELOG.md Introduces an update to linter settings and fixes import ordering in the codebase.
app/app.go, app/upgrades.go, x/marker/keeper/params.go, x/msgfees/types/keys.go, x/name/keeper/query_server.go Specific import additions, removals, and adjustments in these files for improved code structure.

🐇💬
In the realm of code, changes unfold,
Imports dance, in a story untold.
Files reorganize, like a puzzle solved,
Order restored, in a symphony bold.
🌟 Let clean code shine, a sight to behold! 🌟

      (\(\ 
      (-.-)
      o_(")(")

Possibly related issues

  • Issue Epic: SDK v0.50 #1760: The restructuring of imports aligns with the objectives outlined for upgrading the Cosmos SDK to version v0.50.x, ensuring codebase readiness and compatibility with the SDK enhancements.

Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f33c3f3 and c9bcce7.
Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • app/app.go (3 hunks)
  • app/upgrades.go (2 hunks)
  • x/marker/keeper/params.go (1 hunks)
  • x/msgfees/types/keys.go (1 hunks)
  • x/name/keeper/query_server.go (1 hunks)
Files skipped from review as they are similar to previous changes (5)
  • app/app.go
  • app/upgrades.go
  • x/marker/keeper/params.go
  • x/msgfees/types/keys.go
  • x/name/keeper/query_server.go
Additional comments not posted (2)
CHANGELOG.md (2)

115-121: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [73-313]

Consistent list formatting is recommended.

- -
+ *

Change dashes to asterisks for list items to maintain consistency throughout the document.


Line range hint 187-608: Consider using descriptive text for bare URLs.

For better readability and accessibility, wrap bare URLs with descriptive text. For example, change [PR 1234](https://github.com/provenance-io/provenance/pull/1234) to [View Pull Request 1234](https://github.com/provenance-io/provenance/pull/1234).


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Taztingo Taztingo marked this pull request as ready for review April 17, 2024 15:14
@Taztingo Taztingo requested a review from a team as a code owner April 17, 2024 15:14
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Actionable comments outside the diff hunks (3)
x/ibchooks/keeper/keeper.go (1)

[!TIP]
Codebase Verification

The review of the changes in keeper.go reveals a potential issue. The removal of the wasmkeeper import and its associated functionality from keeper.go might be problematic, as wasmkeeper is still extensively used in other parts of the codebase, such as wasm_hook.go, app.go, and several others. This suggests that the wasmkeeper functionality is integral to the application, and its removal from keeper.go could lead to unintended consequences if not properly managed or replaced.

It is recommended to reassess the removal of wasmkeeper from keeper.go to ensure that it does not negatively impact other functionalities that depend on it. Further investigation or clarification from the development team might be necessary to understand the rationale behind this change and to verify that all dependent functionalities have been appropriately addressed.

Analysis chain

Line range hint 6-6: Removal of the wasmkeeper import and addition of the tmhash import are significant changes. The tmhash import is correctly used in the hashPacket function to ensure data integrity. Ensure that the removal of wasmkeeper does not affect other functionalities that might depend on it.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that no other parts of the codebase require `wasmkeeper`.
rg --type go 'wasmkeeper'

Length of output: 1853

CHANGELOG.md (2)

Line range hint 185-606: Convert bare URLs to markdown links for better readability and consistency.

- https://github.com/provenance-io/provenance/issues/1772
+ [PR 1772](https://github.com/provenance-io/provenance/issues/1772)

Line range hint 774-1348: Remove consecutive blank lines to maintain a clean format.

- 

+

SpicyLemon
SpicyLemon previously approved these changes Apr 17, 2024
@Taztingo Taztingo enabled auto-merge (squash) April 17, 2024 17:28
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Actionable comments outside the diff hunks (3)
CHANGELOG.md (3)

Line range hint 186-606: Convert bare URLs to markdown links for better readability and consistency.

- https://github.com/provenance-io/provenance/compare/v1.17.1...v1.18.0
+ [https://github.com/provenance-io/provenance/compare/v1.17.1...v1.18.0](https://github.com/provenance-io/provenance/compare/v1.17.1...v1.18.0)

Line range hint 903-903: Remove unnecessary spaces inside emphasis markers.

- * `MsgMultiSend` is now limited to a single `Input` [PR 1506](https://github.com/provenance-io/provenance/pull/1506).
+ * `MsgMultiSend` is now limited to a single `Input` [PR 1506](https://github.com/provenance-io/provenance/pull/1506).

Line range hint 299-299: Ensure there are no unnecessary spaces inside code span elements.

- ` MsgAddMarker` (with the `from_address` of the gov module account)
+ `MsgAddMarker` (with the `from_address` of the gov module account)

@Taztingo Taztingo disabled auto-merge April 17, 2024 18:18
@Taztingo Taztingo enabled auto-merge (squash) April 18, 2024 18:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Actionable comments outside the diff hunks (2)
CHANGELOG.md (2)

Line range hint 776-1350: Remove extra blank lines.

- 

+

Reduce multiple consecutive blank lines to a single blank line to clean up the document structure.


Line range hint 904-904: Avoid spaces inside emphasis markers.

- * text *
+ *text*

Remove spaces inside emphasis markers for correct Markdown formatting.

@Taztingo Taztingo merged commit 484fe50 into main Apr 18, 2024
18 of 35 checks passed
@Taztingo Taztingo deleted the taztingo/1760-initial-lint branch April 18, 2024 18:06
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.

3 participants