Help & Docs#71
Merged
Merged
Conversation
Reviewer's GuideRefactors the CLI usage and help system by extracting dynamic usage lines and customizing the Cobra help template; renames the in-place flag and corresponding Option method to consistent hyphenation; and enriches documentation and comments to cover directory support, recursive behavior, and clarify file mapping. Class diagram for updated Option methods and flagsclassDiagram
class options {
+bool inplace
+bool recursive
}
class Option {
<<function>>
}
Option <|.. InPlace
Option <|.. Recursive
options o-- Option
InPlace : Option func(*options)
Recursive : Option func(*options)
InPlace : sets o.inplace = true
Recursive : sets o.recursive = true
Flow diagram for enriched file/directory handling and flag logicflowchart TD
A["User runs snaggle command"] --> B{Is path a file or directory?}
B -- File --> C["Snag file and dependencies to DESTINATION"]
B -- Directory --> D["Snag all valid ELF binaries in directory"]
D --> E{Recursive flag set?}
E -- Yes --> F["Recurse subdirectories and snag all ELF binaries"]
E -- No --> G["Snag only binaries directly under directory"]
C & F & G --> H["Apply --in-place flag if set"]
H --> I["Hardlink or copy files as needed"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Consider moving the multi-line usage patterns into the Cobra Examples field and re-enabling the default flag usage line to leverage built-in formatting.
- The helpNotes text and the Snaggle function doc comments now overlap—consolidate them to avoid duplication and drift.
- Renaming the Inplace option to InPlace is a public API change—please update any external references and bump the major version if this is a breaking change.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider moving the multi-line usage patterns into the Cobra Examples field and re-enabling the default flag usage line to leverage built-in formatting.
- The helpNotes text and the Snaggle function doc comments now overlap—consolidate them to avoid duplication and drift.
- Renaming the Inplace option to InPlace is a public API change—please update any external references and bump the major version if this is a breaking change.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary by Sourcery
Standardize the in-place option and overhaul the CLI help and documentation to provide clearer usage guidance.
Enhancements:
Documentation:
Tests: