cmd: llimport - #704
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Review: PR #704
Small, clean, well-scoped change. Adds a new dev CLI cmd/llimport/import.go that imports a Go package and prints its exported scope members, and removes an outdated usage comment in cmd/llcppdump/cppdump.go.
Assessment
- The
packages.NewImporter(nil, workDir)usage matches the established pattern incl/compile_test.go:62; license header and structure are consistent with siblingcmd/tools. - Argument parsing correctly handles the optional
workDirwith a sensible default. - The inline usage strings are accurate; no README references these internal tools, so no docs update is needed.
- Security / Performance / Documentation: no issues found.
Optional (non-blocking)
- Error/usage output goes to stdout and
returns with exit code 0. For script-friendliness, consider routing to stderr with a non-zero exit. Note this matches the pre-existing convention incppdump.go, so it's a codebase-wide style point rather than a regression. scope.Names()order is unspecified; sort before printing only if the output is ever used for diffing/golden comparisons. Fine as-is for an ad-hoc inspection tool.
No blocking issues.
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.
No description provided.