-
Notifications
You must be signed in to change notification settings - Fork 5.8k
chore: remove unnecessary comments and improve code documentation #31335
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
base: main
Are you sure you want to change the base?
chore: remove unnecessary comments and improve code documentation #31335
Conversation
- Remove empty comment lines after copyright headers in multiple files - Remove commented-out dead code in cli/lsp/trace.rs - Add documentation to cli/lib/shared.rs explaining #[allow(unused)] attributes - Add module documentation to cli/cdp.rs explaining #[allow(dead_code)] usage - Add documentation to cli/registry.rs explaining #[allow(dead_code)] for PublishingTaskError.code These changes improve code cleanliness and maintainability without affecting functionality.
|
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdded and refined module-level documentation and removed minor stray/commented lines across several CLI modules; one commented-out struct field was deleted. No behavioral, API, or control-flow changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Comment |
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.
Pull Request Overview
This PR removes unnecessary comments and improves code documentation by:
- Removing empty comment lines after copyright headers in 4 files (cli/tsc/mod.rs, cli/tools/coverage/range_tree.rs, cli/tools/coverage/merge.rs, cli/lsp/path_to_regex.rs)
- Removing commented-out dead code in cli/lsp/trace.rs
- Adding helpful documentation in 3 files to explain intentional use of #[allow(unused)] and #[allow(dead_code)] attributes
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cli/tsc/mod.rs | Removed empty comment line after copyright header |
| cli/tools/coverage/range_tree.rs | Removed empty comment line after copyright header |
| cli/tools/coverage/merge.rs | Removed empty comment line after copyright header |
| cli/registry.rs | Added documentation for the unused code field explaining it's part of the API response |
| cli/lsp/trace.rs | Removed commented-out #[allow(dead_code)] line |
| cli/lsp/path_to_regex.rs | Removed empty comment line after MIT license block |
| cli/lib/shared.rs | Added module documentation explaining why items are marked with #[allow(unused)] |
| cli/cdp.rs | Added module documentation explaining the purpose of #[allow(dead_code)] attributes throughout the file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/cdp.rs
Outdated
| // Copyright 2018-2025 the Deno authors. MIT license. | ||
|
|
||
| C60B | /// Chrome DevTools Protocol (CDP) type definitions. | |
| /// |
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.
Trailing whitespace should be removed from this line. The line ends with spaces after the triple slash, which is inconsistent with Rust documentation conventions.
| /// | |
| /// |
This PR cleans up unnecessary code and comments found throughout the codebase:
Changes Made:
Removed empty comment lines in:
Removed commented-out dead code:
#[allow(dead_code)]lineAdded documentation to explain intentionally unused code:
#[allow(unused)]#[allow(dead_code)]codefieldThese changes improve code maintainability by removing clutter while documenting intentional design decisions.