Add whole-project multi-file analysis: pagurus-check script and pagurus.mk Makefile include#20
Conversation
…akefile include Co-authored-by: DavidLee18 <36877989+DavidLee18@users.noreply.github.com>
pagurus-check script and pagurus.mk Makefile include
|
@copilot so, pagurus-ckeck and pagurus.mk depends on the plugin only, right? if not, make so, and if that's not possible, demonstrate why thoroughly. |
…ompile_commands.json parser Co-authored-by: DavidLee18 <36877989+DavidLee18@users.noreply.github.com>
Both tools now depend only on the plugin + standard POSIX tools:
The only dependencies for both tools are now:
The awk parser handles both |
The plugin analyzed one translation unit at a time with no tooling to run it across a Makefile-based project. This adds two standalone integration artifacts and a test suite for them.
pagurus-check— CLI script for project-wide analysisRuns the plugin across many files, aggregates results, exits non-zero on any error.
Key options:
--dir(recursive*.cscan),--compile-db(awk-parsedcompile_commands.json, compatible withbear makeand cmake),--jobs(continuous job pool, not batch),--dry-run,--ir-pass.Dependencies:
pagurus_plugin.so,clang, and standard POSIX tools (bash ≥ 4,awk,find,grep) — no Python, Perl, or jq required.pagurus.mk— drop-in Makefile includeInherits
CFLAGS/SOURCESautomatically; all variables are overridable (PAGURUS_CLANG,PAGURUS_CFLAGS,PAGURUS_JOBS,PAGURUS_IR_PASS).Dependencies:
pagurus_plugin.so,clang, andmake— no extra tools required.Tests
tests/multifile/— two-file project (widget.cwith intentional E001,main.cclean) with an embeddedMakefileusingpagurus.mktests/run_multifile_tests.sh— 10 tests covering--dir,--compile-db,--dry-run, exit codes, and bothpagurus.mktargetspagurus_multifileREADME
New "Multi-file project integration" section covering both tools, the
bear make+--compile-dbworkflow, and a per-TU analysis scope table.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.