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

fix proto-lint and lint some protobufs #226

Merged
merged 2 commits into from
Jul 12, 2024
Merged

fix proto-lint and lint some protobufs #226

merged 2 commits into from
Jul 12, 2024

Conversation

Vritra4
Copy link
Contributor

@Vritra4 Vritra4 commented Jul 12, 2024

  • fix proto-lint
    • add ENUM_VALUE_PREFIX and ENUM_ZERO_VALUE_SUFFIX to except list in buf.yaml: UPGRADE_POLICY related
  • add stub comments and run proto-all

@Vritra4 Vritra4 requested a review from beer-1 July 12, 2024 06:49
@Vritra4 Vritra4 requested a review from a team as a code owner July 12, 2024 06:49
Copy link

coderabbitai bot commented Jul 12, 2024

Walkthrough

Walkthrough

Recent updates focus on improving and refining protobuf file structures, removing unnecessary imports, and enhancing comments for better readability. Additionally, a new exclusion pattern was added to the .codecov.yml file to ignore certain files from coverage analysis, ensuring more accurate reporting.

Changes

Files/Paths Change Summary
Makefile Updated proto-lint target to include path argument for specific protobuf files linting.
proto/.../nft_transfer/v1/tx.proto Removed import of cosmos/base/v1beta1/coin.proto and adjusted other imports.
proto/.../nft_transfer/v1/types.proto Removed import statement for cosmos_proto/cosmos.proto.
proto/.../perm/v1/query.proto Restructured RPC declaration for PermissionedRelayersByChannel in Query service.
proto/.../perm/v1/tx.proto Removed import of ibc/applications/perm/v1/types.proto and deleted empty lines.
proto/.../perm/v1/types.proto Aligned field declarations in PermissionedRelayers message and introduced PermissionedRelayersList.
proto/.../distribution/v1/genesis.proto Removed import statement for cosmos/base/v1beta1/coin.proto.
proto/.../distribution/v1/query.proto Removed import statement for cosmos/base/v1beta1/coin.proto.
proto/.../gov/v1/genesis.proto Removed imports for gogoproto/gogo.proto, google/protobuf/timestamp.proto, and amino/amino.proto.
proto/.../gov/v1/query.proto Removed import statements for google/protobuf/timestamp.proto and amino/amino.proto.
proto/.../move/v1/types.proto Updated comments for values in UpgradePolicy enum in TableEntry message.
proto/.../mstaking/v1/staking.proto Removed import statement for tendermint/types/types.proto.
proto/.../reward/v1/tx.proto Added a new comment for the UpdateParams RPC handler method within the Msg service.
.codecov.yml Added exclusion pattern **/*.pulsar.go to the ignore list, excluding certain files from coverage analysis.

Poem

In the code, we weave a tale,
Lines adjusted, imports frail.
Protos cleaned, a clearer view,
Linter paths for all to pursue.
Coverage now more precise,
Exclusions make it nice.
CodeRabbit's cheer, so bright and true! 🌟🛠️


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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.

Copy link

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ec5220 and 90bb7eb.

Files ignored due to path filters (12)
  • proto/buf.yaml is excluded by !**/*.yaml
  • x/distribution/types/genesis.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/distribution/types/query.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/gov/types/genesis.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/gov/types/query.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/ibc/nft-transfer/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/ibc/nft-transfer/types/types.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/ibc/perm/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/ibc/perm/types/types.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/move/types/types.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/mstaking/types/staking.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/reward/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
Files selected for processing (13)
  • Makefile (1 hunks)
  • proto/ibc/applications/nft_transfer/v1/tx.proto (1 hunks)
  • proto/ibc/applications/nft_transfer/v1/types.proto (1 hunks)
  • proto/ibc/applications/perm/v1/query.proto (1 hunks)
  • proto/ibc/applications/perm/v1/tx.proto (3 hunks)
  • proto/ibc/applications/perm/v1/types.proto (1 hunks)
  • proto/initia/distribution/v1/genesis.proto (1 hunks)
  • proto/initia/distribution/v1/query.proto (1 hunks)
  • proto/initia/gov/v1/genesis.proto (1 hunks)
  • proto/initia/gov/v1/query.proto (1 hunks)
  • proto/initia/move/v1/types.proto (1 hunks)
  • proto/initia/mstaking/v1/staking.proto (1 hunks)
  • proto/initia/reward/v1/tx.proto (1 hunks)
Files skipped from review due to trivial changes (12)
  • Makefile
  • proto/ibc/applications/nft_transfer/v1/tx.proto
  • proto/ibc/applications/nft_transfer/v1/types.proto
  • proto/ibc/applications/perm/v1/query.proto
  • proto/ibc/applications/perm/v1/tx.proto
  • proto/ibc/applications/perm/v1/types.proto
  • proto/initia/distribution/v1/genesis.proto
  • proto/initia/distribution/v1/query.proto
  • proto/initia/gov/v1/genesis.proto
  • proto/initia/gov/v1/query.proto
  • proto/initia/mstaking/v1/staking.proto
  • proto/initia/reward/v1/tx.proto
Additional comments not posted (1)
proto/initia/move/v1/types.proto (1)

93-101: LGTM!

The added comments for the UpgradePolicy enum values improve readability and maintainability.

Copy link

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 90bb7eb and d2b6494.

Files selected for processing (1)
  • .codecov.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .codecov.yml

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.25%. Comparing base (fadf760) to head (d2b6494).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #226   +/-   ##
=======================================
  Coverage   40.25%   40.25%           
=======================================
  Files         259      259           
  Lines       24639    24639           
=======================================
  Hits         9919     9919           
  Misses      13187    13187           
  Partials     1533     1533           

see 7 files with indirect coverage changes

Copy link
Contributor

@beer-1 beer-1 left a comment

Choose a reason for hiding this comment

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

LGTM

@beer-1 beer-1 merged commit a1dbebf into main Jul 12, 2024
7 checks passed
@beer-1 beer-1 deleted the fix/proto-lint branch July 12, 2024 09:54
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.

2 participants