-
Notifications
You must be signed in to change notification settings - Fork 31
Add utils: cxref, cflow, ctags #483
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
Conversation
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 adds three POSIX C development utilities (cflow, ctags, and cxref) to the posixutils-rs project, along with supporting infrastructure changes.
Purpose: Implement POSIX-compliant C source code analysis tools that generate call flow graphs (cflow), tag files for editors (ctags), and cross-reference tables (cxref). These utilities leverage a newly exported library interface from the existing pcc (POSIX C compiler) crate.
Key Changes:
- Creates a library interface (
cc/lib.rs) to share the C parser infrastructure across utilities - Implements three new utilities with comprehensive integration tests
- Improves m4 test infrastructure to handle parallel test execution and flexible binary paths
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| cc/lib.rs | New library interface exposing C parser, tokenizer, and related infrastructure for use by cflow, ctags, and cxref |
| cc/cflow.rs | Implementation of cflow utility that generates C-language flowgraphs showing function call relationships |
| cc/ctags.rs | Implementation of ctags utility that creates tag files for vi/ex editors, recognizing functions, typedefs, and macros |
| cc/cxref.rs | Implementation of cxref utility that generates cross-reference tables showing symbol definitions and uses |
| cc/Cargo.toml | Adds library target and three new binary targets for the new utilities |
| cc/tests/integration.rs | Adds test module declarations for the three new utilities |
| cc/tests/cflow/mod.rs | Integration tests for cflow covering basic operation, depth limits, reverse mode, and output format |
| cc/tests/cflow/test.c | Test fixture C source file for cflow tests |
| cc/tests/ctags/mod.rs | Integration tests for ctags covering basic tagging, index mode, append mode, and sorted output |
| cc/tests/ctags/test.c | Test fixture C source file for ctags tests |
| cc/tests/cxref/mod.rs | Integration tests for cxref covering symbol detection, definitions, silent mode, and output files |
| cc/tests/cxref/test.c | Test fixture C source file for cxref tests |
| lib/utils.tsv | Registers the three new utilities in the project's utility index |
| README.md | Moves cflow, ctags, and cxref from "Stage 0 - Not started" to completed Development utilities |
| m4/tests/integration_test.rs | Improves test infrastructure with proper workspace detection, race-free cargo builds using Once, and support for both debug and release binaries |
No description provided.