Skip to content

Conversation

@steve-the-edwards
Copy link
Contributor

Rather than as part of the base gradle InvertTask we do this as part of the InvertReportWriter.writeProjectData as the individual JSON and SARIF files another form of the project data.

(Also this allows the iOS runner to call this directly when it calls the report writer!)

Copy link

Copilot AI left a 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 refactors the code to move individual JSON and SARIF file generation from InvertTask to InvertReportWriter.writeProjectData. This architectural change treats these files as another form of project data and enables the iOS runner to call the report writer directly.

Key Changes:

  • Moved writeIndividualCodeReferenceStatFiles() method and related constants from InvertTask to InvertReportWriter
  • Updated InvertReportWriter.writeProjectData() signature to accept InvertCombinedCollectedData and techDebtInitiatives parameters
  • Added comprehensive test coverage for the new functionality in InvertReportWriterTest

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
invert-gradle-plugin/src/test/kotlin/com/squareup/invert/internal/report/InvertReportWriterTest.kt New test file with 630 lines covering JSON/SARIF file generation, TDI config writing, and multi-module scenarios
invert-gradle-plugin/src/main/kotlin/com/squareup/invert/internal/tasks/InvertTask.kt Removed code reference export logic and updated writeProjectData() call to pass combined data object
invert-gradle-plugin/src/main/kotlin/com/squareup/invert/internal/report/InvertReportWriter.kt Added writeIndividualCodeReferenceStatFiles() method and updated writeProjectData() to handle JSON/SARIF generation and TDI config writing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@handstandsam handstandsam left a comment

Choose a reason for hiding this comment

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

Please do an integration test, but LGTM

@steve-the-edwards steve-the-edwards merged commit c40bdad into main Nov 25, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants