-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
docs: fix markdown code grammar #22316
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request primarily enhance the documentation of the Changes
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (4)
collections/README.md (4)
Line range hint
27-166
: LGTM with a minor formatting suggestion.The Preliminary components section provides clear explanations of SchemaBuilder, Prefix, and Human-Readable Name, along with helpful code examples. However, there's a minor formatting issue in one of the code blocks.
Consider adding language identifiers to all code blocks for consistent syntax highlighting. For example, the code block starting at line 166 should be:
-``` +```go package collections
Line range hint
168-379
: LGTM with a minor typo correction.The Map section provides a comprehensive explanation of the Map collection type and its methods, with clear code examples. However, there's a minor typo in one of the comments.
In the comment for the Remove method, there's a typo:
-// The remove method accepts the `AccAddress` and removes it from the store. It won't report errors +// The remove method accepts the `AccAddress` and removes it from the store. It won't report error // if it does not exist, to check for existence before removal use the ``Has`` method.
Line range hint
570-707
: LGTM with a minor naming consistency suggestion.The Iteration section provides a comprehensive explanation of how to iterate over collections, with detailed code examples covering various use cases. However, there's a minor inconsistency in method naming.
For consistency, consider renaming the
IterateAccountsBetween
method toGetAccountsBetween
to match the naming pattern of other methods likeGetAllAccounts
. This would make the API more consistent:-func (k Keeper) IterateAccountsBetween(ctx sdk.Context, start, end uint64) ([]authtypes.BaseAccount, error) { +func (k Keeper) GetAccountsBetween(ctx sdk.Context, start, end uint64) ([]authtypes.BaseAccount, error) {🧰 Tools
🪛 LanguageTool
[style] ~687-~687: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ... } } ``` #### The Map Key definition First of all we can see that in order to define a co...(FIRST_OF_ALL)
[style] ~688-~688: Consider a shorter alternative to avoid wordiness.
Context: ...efinition First of all we can see that in order to define a composite key of two elements ...(IN_ORDER_TO_PREMIUM)
Line range hint
709-769
: LGTM with a minor typo correction.The Composite keys section provides a clear explanation of how to work with composite keys in collections, with helpful code examples using bank balances. However, there's a minor typo in one of the examples.
In the
GetAllAddressBalances
function, there's a typo in the denom:-(bob, osmos) => 15 +(bob, osmo) => 15
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (1)
- collections/README.md (5 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
collections/README.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
🔇 Additional comments (7)
collections/README.md (7)
Line range hint
1-15
: LGTM: Clear introduction and installation instructions.The introduction effectively explains the purpose of the Collections library and its benefits. The installation instructions are straightforward and easy to follow.
Line range hint
17-25
: LGTM: Comprehensive overview of core types.This section effectively introduces the five main APIs of the Collections library, providing a clear and concise overview for users.
Line range hint
381-483
: LGTM: Clear explanation of KeySet collection.The KeySet section provides a clear explanation of the KeySet collection type and its methods, with helpful code examples. The implementation details and differences from Map are well explained.
Line range hint
485-568
: LGTM: Comprehensive explanation of Item collection.The Item section provides a thorough explanation of the Item collection type, its use case, and its methods. The code examples effectively illustrate how to use this collection type.
Line range hint
771-1114
: LGTM: Comprehensive explanation of IndexedMap.The IndexedMap section provides a thorough explanation of the IndexedMap collection type, including how to define indexes, instantiate an IndexedMap, and work with it. The code examples effectively illustrate the concepts with a practical use case of account indexing.
Line range hint
1116-1273
: LGTM: Clear explanations of advanced usage patterns.The sections on Collections with interfaces as values and Triple key provide clear explanations of these advanced usage patterns. The code examples effectively illustrate how to work with interface values and triple keys in collections.
Line range hint
1-1273
: Excellent documentation with minor improvements suggested.The Collections library documentation is comprehensive, well-structured, and provides clear explanations with helpful code examples for each component. It effectively covers core types, preliminary components, and advanced usage patterns.
A few minor issues were identified:
- Some code blocks lack language identifiers for consistent syntax highlighting.
- There are a couple of minor typos in comments and examples.
- A slight naming inconsistency was found in one of the method names.
These minor issues do not significantly impact the overall quality of the documentation. Addressing them would further enhance the already excellent documentation.
🧰 Tools
🪛 LanguageTool
[style] ~687-~687: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ... } } ``` #### The Map Key definition First of all we can see that in order to define a co...(FIRST_OF_ALL)
[style] ~688-~688: Consider a shorter alternative to avoid wordiness.
Context: ...efinition First of all we can see that in order to define a composite key of two elements ...(IN_ORDER_TO_PREMIUM)
@@ -687,9 +687,9 @@ func NewKeeper(storeKey *storetypes.KVStoreKey) Keeper { | |||
|
|||
First of all we can see that in order to define a composite key of two elements we use the `collections.Pair` type: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty!
Description
markdown code grammar
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
collections.Triple
,collections.Pair
) with usage examples.