Skip to content

Commit

Permalink
Only these specific types
Browse files Browse the repository at this point in the history
  • Loading branch information
handstandsam committed Jul 5, 2024
1 parent b51be72 commit 21d8a4f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.squareup.invert.internal.models.CollectedDependenciesForProject
import com.squareup.invert.internal.models.CollectedOwnershipForProject
import com.squareup.invert.internal.models.CollectedPluginsForProject
import com.squareup.invert.internal.models.CollectedStatsForProject
import com.squareup.invert.models.CollectedStatType
import com.squareup.invert.models.ConfigurationName
import com.squareup.invert.models.DependencyId
import com.squareup.invert.models.GradlePath
Expand Down Expand Up @@ -42,6 +43,17 @@ object InvertJsReportUtils {

fun computeGlobalStats(allProjectsStatsData: StatsJsReportModel): Map<StatMetadata, Int> {
val globalStats: Map<StatMetadata, Int> = allProjectsStatsData.statInfos.values
.filter { statInfo ->
when (statInfo.statType) {
CollectedStatType.BOOLEAN,
CollectedStatType.NUMERIC,
CollectedStatType.CODE_REFERENCES -> true

else -> {
false
}
}
}
.associateWith { statMetadata ->
val statKey = statMetadata.key
allProjectsStatsData.statsByModule.values.sumOf { statsForModule: Map<StatKey, Stat> ->
Expand Down

0 comments on commit 21d8a4f

Please sign in to comment.