Skip to content

Commit 31cb925

Browse files
committed
tweaks to the asset associations
1 parent f2638c7 commit 31cb925

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

engine/plugins/horizontals/plugin.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,18 @@ func (h *horizPlugin) Stop() {
9393
func (h *horizPlugin) addAssociatedRelationship(e *et.Event, assocs []*scope.Association) {
9494
for _, assoc := range assocs {
9595
for _, impacted := range assoc.ImpactedAssets {
96-
if match, conf := e.Session.Scope().IsAssetInScope(impacted.Asset, 0); conf > 0 && match != nil {
96+
tstr := string(impacted.Asset.AssetType())
97+
matches, err := e.Session.Config().CheckTransformations(tstr, tstr, h.name)
98+
if err != nil || matches.Len() == 0 {
99+
continue
100+
}
101+
102+
conf := matches.Confidence(h.name)
103+
if conf == -1 {
104+
conf = matches.Confidence(tstr)
105+
}
106+
107+
if match, result := e.Session.Scope().IsAssetInScope(impacted.Asset, conf); result > 0 && match != nil {
97108
if a, hit := e.Session.Cache().GetAsset(match); hit && a != nil {
98109
for _, assoc2 := range e.Session.Scope().AssetsWithAssociation(e.Session.Cache(), a) {
99110
h.makeAssocRelationshipEntries(e, assoc.Match, assoc2)

0 commit comments

Comments
 (0)