Conversation
* feature: add package file * Update specs/0006-package-file.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the Go language by integrating a new Go parser, updating formatting rules, and adjusting the CodeBank logic and documentation.
- Introduces GoParser in the language module and updates public exports.
- Updates CodeBank to detect, parse, and format Go files along with relevant tests and examples.
- Adjusts documentation and dependencies (Cargo.toml, README) to reflect Go support.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/parser/mod.rs | Includes GoParser in public exports and updates language matching for Go. |
| src/parser/lang/mod.rs | Adds the Go module and parser struct definition. |
| src/parser/formatter/rules.rs | Introduces a GO_RULES constant and integrates Go formatting in language rule matching. |
| src/bank.rs | Integrates GoParser into CodeBank, adds go-related language detection, parsing, and tests. |
| specs/0006-package-file.md | Documents package file inclusion requirements. |
| fixtures/sample.go | Provides sample Go file for parser testing. |
| examples/parser.rs | Updates examples to include Go parsing. |
| README.md | Updates documentation to mention Go support. |
| Cargo.toml | Updates version and adds tree-sitter-go dependency. |
| // Log or handle the error appropriately, for now just continuing | ||
| eprintln!("Warning: Failed to read package file: {}", e); | ||
| } |
There was a problem hiding this comment.
Consider propagating the error from reading the package file instead of only logging with eprintln, so that consumers of the function can handle the error appropriately.
| // Log or handle the error appropriately, for now just continuing | |
| eprintln!("Warning: Failed to read package file: {}", e); | |
| } | |
| // Propagate the error to allow the caller to handle it | |
| return Err(e); |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for Go parsing and formatting in the CodeBank project. In summary, the changes add a new GoParser, update language detection and formatting rules for Go, and adjust tests and documentation to include Go support.
- Introduces a new Go module in the parser and language layers.
- Updates CodeBank to recognize Go file extensions and names.
- Enhances documentation (README and Cargo.toml) to reflect Go support.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/parser/mod.rs | Added GoParser to the parser aggregate and language docs. |
| src/parser/lang/mod.rs | Introduced GoParser in language modules. |
| src/parser/formatter/rules.rs | Added formatter rules for Go language syntax. |
| src/bank.rs | Integrated GoParser into bank logic; updated tests. |
| fixtures/sample.go | Introduced a sample Go file to test the new parser. |
| examples/parser.rs | Updated examples to demonstrate Go parsing support. |
| README.md | Documented Go support in the project overview. |
| Cargo.toml | Added dependency for tree-sitter-go and updated description. |
No description provided.