summaryrefslogtreecommitdiff
path: root/java/lint.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-10-23 16:57:06 -0700
committer Colin Cross <ccross@android.com> 2024-10-24 10:55:33 -0700
commita14fb6a73e2207c1084a0230fd97f08c14ef4818 (patch)
tree3300c5bf686fc67e71400ab8bac8c39b5d1c6c0b /java/lint.go
parent11d0c38a2b295774f4c91f8f571323359add9835 (diff)
Update DepSet references
Update all references to depset to use blueprint/depset, and to use DepSet instead of *DepSet. Bug: 375276086 Test: all soong tests pass Flag: EXEMPT refactor Change-Id: I59a7836d0975366ddc336225fb770ac7e6e0c8ea
Diffstat (limited to 'java/lint.go')
-rw-r--r--java/lint.go37
1 files changed, 15 insertions, 22 deletions
diff --git a/java/lint.go b/java/lint.go
index 2cbefc3bb..ac90e19ba 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -20,6 +20,7 @@ import (
"strings"
"github.com/google/blueprint"
+ "github.com/google/blueprint/depset"
"github.com/google/blueprint/proptools"
"android/soong/android"
@@ -101,19 +102,19 @@ type linter struct {
}
type LintDepSets struct {
- HTML, Text, XML, Baseline *android.DepSet[android.Path]
+ HTML, Text, XML, Baseline depset.DepSet[android.Path]
}
type LintDepSetsBuilder struct {
- HTML, Text, XML, Baseline *android.DepSetBuilder[android.Path]
+ HTML, Text, XML, Baseline *depset.Builder[android.Path]
}
func NewLintDepSetBuilder() LintDepSetsBuilder {
return LintDepSetsBuilder{
- HTML: android.NewDepSetBuilder[android.Path](android.POSTORDER),
- Text: android.NewDepSetBuilder[android.Path](android.POSTORDER),
- XML: android.NewDepSetBuilder[android.Path](android.POSTORDER),
- Baseline: android.NewDepSetBuilder[android.Path](android.POSTORDER),
+ HTML: depset.NewBuilder[android.Path](depset.POSTORDER),
+ Text: depset.NewBuilder[android.Path](depset.POSTORDER),
+ XML: depset.NewBuilder[android.Path](depset.POSTORDER),
+ Baseline: depset.NewBuilder[android.Path](depset.POSTORDER),
}
}
@@ -128,18 +129,10 @@ func (l LintDepSetsBuilder) Direct(html, text, xml android.Path, baseline androi
}
func (l LintDepSetsBuilder) Transitive(info *LintInfo) LintDepSetsBuilder {
- if info.TransitiveHTML != nil {
- l.HTML.Transitive(info.TransitiveHTML)
- }
- if info.TransitiveText != nil {
- l.Text.Transitive(info.TransitiveText)
- }
- if info.TransitiveXML != nil {
- l.XML.Transitive(info.TransitiveXML)
- }
- if info.TransitiveBaseline != nil {
- l.Baseline.Transitive(info.TransitiveBaseline)
- }
+ l.HTML.Transitive(info.TransitiveHTML)
+ l.Text.Transitive(info.TransitiveText)
+ l.XML.Transitive(info.TransitiveXML)
+ l.Baseline.Transitive(info.TransitiveBaseline)
return l
}
@@ -204,10 +197,10 @@ type LintInfo struct {
XML android.Path
ReferenceBaseline android.Path
- TransitiveHTML *android.DepSet[android.Path]
- TransitiveText *android.DepSet[android.Path]
- TransitiveXML *android.DepSet[android.Path]
- TransitiveBaseline *android.DepSet[android.Path]
+ TransitiveHTML depset.DepSet[android.Path]
+ TransitiveText depset.DepSet[android.Path]
+ TransitiveXML depset.DepSet[android.Path]
+ TransitiveBaseline depset.DepSet[android.Path]
}
func (l *linter) enabled() bool {