Skip to content

Comments

Feature/improve formatter#7

Merged
tyrchen merged 3 commits intomasterfrom
feature/improve-formatter
Apr 29, 2025
Merged

Feature/improve formatter#7
tyrchen merged 3 commits intomasterfrom
feature/improve-formatter

Conversation

@tyrchen
Copy link
Owner

@tyrchen tyrchen commented Apr 29, 2025

No description provided.

@tyrchen tyrchen requested a review from Copilot April 29, 2025 06:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@tyrchen tyrchen merged commit 25ed49a into master Apr 29, 2025
1 check passed
@tyrchen tyrchen deleted the feature/improve-formatter branch April 29, 2025 06:12
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