Skip to content

Add JSON metadata for scanner reports - #28

Merged
andrew merged 2 commits into
mainfrom
issues-18-21-report-fields
Aug 21, 2026
Merged

Add JSON metadata for scanner reports#28
andrew merged 2 commits into
mainfrom
issues-18-21-report-fields

Conversation

@andrew

@andrew andrew commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Adds scanner name and binary version to JSON reports. Reported files now include source-byte SHA-256 hashes and legal-file roles, while expressions record whether root legal or README files contributed them.

Schema 2 remains additive. Existing output modes and exit codes are unchanged.

Closes #18
Closes #19
Closes #20
Closes #21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends schema 2 JSON scanner reports with provenance and file-level metadata while preserving existing output modes and exit codes.

Changes:

  • Adds scanner name and binary version.
  • Adds SHA-256 hashes and legal-file roles.
  • Marks expressions contributed by root legal or README files.

Non-blocking nit: cmd/licenses/scan.go computes legal-file roles before filtering non-reportable files, causing avoidable per-file overhead.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/licenses/scan.go Implements report metadata and classification logic.
cmd/licenses/scan_test.go Tests metadata, hashes, roles, and expression classification.
cmd/licenses/main.go Passes CLI version into scans.
cmd/licenses/main_test.go Verifies JSON metadata and output fields.
cmd/licenses/licensee_comparison_test.go Updates scanner invocation.
cmd/licenses/benchmark_test.go Updates benchmark invocations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmd/licenses/scan.go
@andrew
andrew force-pushed the issues-18-21-report-fields branch from 47abe3b to e7ac0a9 Compare August 21, 2026 08:35
@andrew
andrew merged commit 711404a into main Aug 21, 2026
9 checks passed
@andrew
andrew deleted the issues-18-21-report-fields branch August 21, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants