summaryrefslogtreecommitdiff
path: root/android-lint/src
diff options
context:
space:
mode:
authorBradley Smith <smithbradley@google.com>2021-10-07 07:38:06 -0700
committerBradley Smith <smithbradley@google.com>2021-10-12 15:29:18 +0000
commit9f77dd86323795686373a89ef9ac0e1303512f9f (patch)
treee97e743fa671195211ce0630c730b61204e29855 /android-lint/src
parent835d49d4f83c813f30084365593feaecfe4b9e28 (diff)
downloadidea-9f77dd86323795686373a89ef9ac0e1303512f9f.tar.gz
[MPSS] Only dump holder modules with facets
This hugely reduces the spam in the snapshots when running in module per source set. Bug: N/A Test: N/A Change-Id: I02b38a9d13d4535e3a46185b9ea29085eb810a8c
Diffstat (limited to 'android-lint/src')
-rw-r--r--android-lint/src/com/android/tools/idea/lint/model/LintModelDumper.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/android-lint/src/com/android/tools/idea/lint/model/LintModelDumper.kt b/android-lint/src/com/android/tools/idea/lint/model/LintModelDumper.kt
index 4dcc8983042..66b08b4c710 100644
--- a/android-lint/src/com/android/tools/idea/lint/model/LintModelDumper.kt
+++ b/android-lint/src/com/android/tools/idea/lint/model/LintModelDumper.kt
@@ -19,6 +19,7 @@ import com.android.tools.idea.gradle.project.model.AndroidModuleModel
import com.android.tools.idea.gradle.project.sync.internal.ProjectDumper
import com.android.tools.idea.gradle.project.sync.internal.head
import com.android.tools.idea.gradle.project.sync.internal.prop
+import com.android.tools.idea.projectsystem.isHolderModule
import com.android.tools.lint.model.LintModelAndroidArtifact
import com.android.tools.lint.model.LintModelAndroidLibrary
import com.android.tools.lint.model.LintModelArtifact
@@ -42,7 +43,9 @@ fun ProjectDumper.dumpLintModels(project: Project) {
head("MODULE") { module.name }
nest {
val androidModuleModel = AndroidModuleModel.get(module)
- if (androidModuleModel != null) {
+ // Skip all but holders to prevent needless spam in the snapshots. All modules
+ // point to the same facet.
+ if (module.isHolderModule() && androidModuleModel != null) {
val lintModelModule = LintModelFactory().create(
androidModuleModel.androidProject,
androidModuleModel.variants,