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.
feat: add cargo-unused-deps #102
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?
Uh oh!
There was an error while loading. Please reload this page.
feat: add cargo-unused-deps #102
Changes from all commits
0cab26f51b999dd240f354d7b097c132cf5db97acbf704af9d4a95e22f8c34e1e6a0575656b50b5738969b188f1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
[Copilot speaking]
Standardize the Cargo subcommand terminology
The new package describes the same concept as a "cargo subcommand" in package metadata, a "cargo sub-command" in the README introduction, and a "cargo workspace" in the usage section. Elsewhere in the crate, including its CLI type documentation, the established form is "Cargo subcommand". Using one spelling and capitalization avoids presenting the Cargo product name and its subcommand concept as several different terms.
Reproducible reasoning: Cargo is the name of the Rust package manager, so prose uses it as a proper name, while Cargo's own documentation spells "subcommand" as one word. The reviewed files introduce lowercase and hyphenated variants for that same concept:
Cargo.tomlline 6 uses "cargo subcommand", README line 16 uses "cargo sub-command", and README line 34 uses "cargo workspace". These are not command invocations, where lowercasecargowould be correct; they are prose naming Cargo and its concepts. The variation is therefore terminology drift rather than a meaningful distinction.Consequence: Package registry metadata and the README present inconsistent names for the tool category, and readers may reasonably wonder whether "sub-command" denotes something different from the standard Cargo "subcommand" term.
Recommended action: Use "Cargo subcommand" consistently in the package description and README prose, and capitalize Cargo in "Cargo workspace". Preserve lowercase
cargoonly in command examples and executable names.References:
Impacted locations:
crates/cargo-ensure-no-unused-workspace-deps/Cargo.toml:6crates/cargo-ensure-no-unused-workspace-deps/README.md:16crates/cargo-ensure-no-unused-workspace-deps/README.md:34There 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.
[Copilot speaking]
Condense rustdoc summaries before their detailed paragraphs
The crate summary and several item summaries render as first paragraphs longer than one 80-character line. Wrapping consecutive
//!or///source lines does not create a paragraph break, so the rendered summary remains long. This affects the crate overview and the catalog, inheritance, partitioning, comment-prepending, check, and write-back documentation.Reproducible reasoning: Rustdoc uses the first paragraph as an item's concise summary in indexes and overview contexts. Each cited block contains consecutive documentation lines without a blank line, so its detailed explanation is folded into that summary instead of appearing as supporting prose.
Consequence: The opening text wraps in generated documentation and makes item indexes and crate overviews less scannable than a short summary followed by detail.
Recommended action: Condense each cited first paragraph to a short rendered summary, then move useful detail into a following paragraph separated by a blank documentation line. Regenerate
README.mdafter changing the crate-level documentation.Impacted locations:
crates/cargo-ensure-no-unused-workspace-deps/README.md:16-17crates/cargo-ensure-no-unused-workspace-deps/src/lib.rs:4-5crates/cargo-ensure-no-unused-workspace-deps/src/main.rs:4-5crates/cargo-ensure-no-unused-workspace-deps/src/detect.rs:27-28crates/cargo-ensure-no-unused-workspace-deps/src/detect.rs:53-54crates/cargo-ensure-no-unused-workspace-deps/src/detect.rs:126-127crates/cargo-ensure-no-unused-workspace-deps/src/detect.rs:136-137crates/cargo-ensure-no-unused-workspace-deps/src/fix.rs:170-171crates/cargo-ensure-no-unused-workspace-deps/src/lib.rs:169-170crates/cargo-ensure-no-unused-workspace-deps/src/lib.rs:231-232There 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.
[Copilot speaking]
State each
--fixsafeguard in a direct sentenceThe
--fixparagraph compresses atomic replacement, same-directory staging, permission preservation, symlink-target handling, and concurrent-edit detection into one heavily parenthesized sentence. It also uses the informal verb “clobbered” for overwriting an edit.Reproducible reasoning: The participial clauses do not consistently name whether the temporary file, the rename, or the overall operation carries permissions and follows a symlink. These are independent safeguards with different mechanisms, so separate subject-and-verb sentences would make the contract easier to read and would remain clearer if one safeguard changes.
Consequence: Readers can misinterpret which operation preserves each file property, and informal wording makes a publication-facing safety statement less precise.
Recommended action: Rewrite the canonical crate-level documentation as short, direct sentences that name the operation responsible for atomic replacement, permission preservation, symlink-target handling, and change detection. Use “overwritten” instead of “clobbered”, then regenerate the README.
References:
Impacted locations:
crates/cargo-ensure-no-unused-workspace-deps/README.md:65-69Uh oh!
There was an error while loading. Please reload this page.