Overhauls the audit/check reporting so large repos get concise, grouped, machine-readable output without changing the default (no-flag) report.
What's in this PR
Reporting features
--summary (counts-only), --group-by license|category|type|directory, --sort key|count, --depth N, and --only missing,unknown,copyleft,violations across text/markdown/JSON.
Per-group risk markers and per-group license breakdowns (a directory/type view is no longer license-blind).
Attributable policy violations in every format (offending license + rule + file in text/markdown; structured violationDetails in JSON).
findings, per-row percentages/totals, and riskLevel/worstCategory in JSON and markdown (previously text-only).
JSON always emits the full report; --summary only trims the human formats.
Correctness fixes (this session)
Self-config exclusion: the tool's own .license-tool.yaml is YAML (commentable) and was counted as a headerless source file, inflating sourceTotal/sourceMissing; under default policy it even failed check. It is now marked skipped (reason tool config), still listed but excluded from coverage.
Policy-aware group risk: a group's [risk] was license-category-only, so an Apache group beside AGPL read low. It now escalates to high on a repo-level hard incompatibility (policy.Incompatible) or a file-scoped policy violation. The incompatibility set is derived from the full report so --only cannot distort a group's risk.
Testing
TDD throughout. Full gate green: gofmt, go vet, golangci-lint (0 issues), go test ./... -race, and the 100% coverage threshold (go-test-coverage).
The session delta was put through a three-agent adversarial review (correctness, test-quality, regression/doc); findings were addressed in fix(#35): harden group risk under --only; review-driven follow-ups.
go.mod dependency resolution: not a defect (Go modules are not a supported ecosystem).
Independent of #29 (init TUI), which targets develop separately.
Closes #35.
Overhauls the `audit`/`check` reporting so large repos get concise, grouped, machine-readable output without changing the default (no-flag) report.
## What's in this PR
### Reporting features
- `--summary` (counts-only), `--group-by license|category|type|directory`, `--sort key|count`, `--depth N`, and `--only missing,unknown,copyleft,violations` across text/markdown/JSON.
- Per-group **risk** markers and per-group license breakdowns (a `directory`/`type` view is no longer license-blind).
- Attributable policy violations in every format (offending license + rule + file in text/markdown; structured `violationDetails` in JSON).
- `findings`, per-row percentages/totals, and `riskLevel`/`worstCategory` in JSON and markdown (previously text-only).
- JSON always emits the full report; `--summary` only trims the human formats.
### Correctness fixes (this session)
- **Self-config exclusion:** the tool's own `.license-tool.yaml` is YAML (commentable) and was counted as a headerless source file, inflating `sourceTotal`/`sourceMissing`; under default policy it even failed `check`. It is now marked skipped (reason `tool config`), still listed but excluded from coverage.
- **Policy-aware group risk:** a group's `[risk]` was license-category-only, so an Apache group beside AGPL read `low`. It now escalates to `high` on a repo-level hard incompatibility (`policy.Incompatible`) or a file-scoped policy violation. The incompatibility set is derived from the **full** report so `--only` cannot distort a group's risk.
## Testing
- TDD throughout. Full gate green: `gofmt`, `go vet`, `golangci-lint` (0 issues), `go test ./... -race`, and the **100% coverage** threshold (`go-test-coverage`).
- The session delta was put through a three-agent adversarial review (correctness, test-quality, regression/doc); findings were addressed in `fix(#35): harden group risk under --only; review-driven follow-ups`.
## Decisions recorded (see DESIGN addenda)
- `--group-by dependency`: confirmed non-goal (deps aren't files; ambiguous semantics).
- JSON explicit percentages: declined (presentation concern; derivable from counts + findings).
- `go.mod` dependency resolution: not a defect (Go modules are not a supported ecosystem).
Independent of #29 (init TUI), which targets `develop` separately.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #35.
Overhauls the
audit/checkreporting so large repos get concise, grouped, machine-readable output without changing the default (no-flag) report.What's in this PR
Reporting features
--summary(counts-only),--group-by license|category|type|directory,--sort key|count,--depth N, and--only missing,unknown,copyleft,violationsacross text/markdown/JSON.directory/typeview is no longer license-blind).violationDetailsin JSON).findings, per-row percentages/totals, andriskLevel/worstCategoryin JSON and markdown (previously text-only).--summaryonly trims the human formats.Correctness fixes (this session)
.license-tool.yamlis YAML (commentable) and was counted as a headerless source file, inflatingsourceTotal/sourceMissing; under default policy it even failedcheck. It is now marked skipped (reasontool config), still listed but excluded from coverage.[risk]was license-category-only, so an Apache group beside AGPL readlow. It now escalates tohighon a repo-level hard incompatibility (policy.Incompatible) or a file-scoped policy violation. The incompatibility set is derived from the full report so--onlycannot distort a group's risk.Testing
gofmt,go vet,golangci-lint(0 issues),go test ./... -race, and the 100% coverage threshold (go-test-coverage).fix(#35): harden group risk under --only; review-driven follow-ups.Decisions recorded (see DESIGN addenda)
--group-by dependency: confirmed non-goal (deps aren't files; ambiguous semantics).go.moddependency resolution: not a defect (Go modules are not a supported ecosystem).Independent of #29 (init TUI), which targets
developseparately.