Skip to content

Conversation

@steve-the-edwards
Copy link
Contributor

We were exporting to JSON/SARIF right before we did the aggregate pass which allows collectors to create new stats based on aggregated data across all projects. This needs to be included in the export!

So we do it in the InvertTask after the aggregation.

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 reference export logic by moving the exportFullListOfCodeReferences function from CollectedStatAggregator to InvertTask, addressing a TODO comment about moving the export out of the aggregation phase.

Key Changes:

  • Moved exportFullListOfCodeReferences function and related constants from CollectedStatAggregator to InvertTask
  • Changed export timing to occur after aggregation instead of before
  • Extracted reportOutputConfig to a local variable for reuse

Reviewed Changes

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

File Description
invert-gradle-plugin/src/main/kotlin/com/squareup/invert/internal/tasks/InvertTask.kt Added exportFullListOfCodeReferences function and related constants; updated to call the function after aggregation with the aggregated data
invert-gradle-plugin/src/main/kotlin/com/squareup/invert/internal/CollectedStatAggregator.kt Removed exportFullListOfCodeReferences function, related constants, and the function call from the aggregate method

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

)
}


Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

Remove the extra blank line. There should only be one blank line before the constant declarations.

Suggested change

Copilot uses AI. Check for mistakes.
@steve-the-edwards steve-the-edwards merged commit 4fff891 into main Nov 7, 2025
11 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.

3 participants