Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves the formatter functionality and language detection for the code documentation generator. Key changes include:
- Adding a new LanguageType::as_str method for converting language enums to string representations.
- Refactoring the ModuleUnit formatting logic to filter and process only public code elements.
- Updating the bank module to use WalkBuilder and adjust language determination for code blocks.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/parser/mod.rs | Adds LanguageType::as_str for consistent string representations. |
| src/parser/formatter/mod.rs | Refactors the formatting of public code elements via local filters. |
| src/bank.rs | Updates file parsing with WalkBuilder and language detection logic. |
| Cargo.toml | Bumps package version from 0.4.3 to 0.4.4. |
Comments suppressed due to low confidence (2)
src/parser/formatter/mod.rs:252
- [nitpick] The variable name 'fns' is a terse abbreviation; consider renaming it to 'public_functions' for improved clarity.
let fns: Vec<&FunctionUnit> = self
src/parser/formatter/mod.rs:272
- [nitpick] The variable name 'mods' may be too abbreviated; consider renaming it to 'public_submodules' for better clarity.
let mods: Vec<&ModuleUnit> = self
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.