/build/make/tools/compliance/ |
D | policy_shipped.go | 19 func ShippedNodes(lg *LicenseGraph) TargetNodeSet { 20 lg.mu.Lock() 21 shipped := lg.shippedNodes 22 lg.mu.Unlock() 29 WalkTopDown(NoEdgeContext{}, lg, func(lg *LicenseGraph, tn *TargetNode, path TargetEdgePath) bool { 44 lg.mu.Lock() 45 if lg.shippedNodes == nil { 46 lg.shippedNodes = shipped 49 shipped = lg.shippedNodes 51 lg.mu.Unlock()
|
D | readgraph.go | 73 lg *LicenseGraph member 102 lg := newLicenseGraph() 105 lg.rootFiles = append(lg.rootFiles, f) 107 lg.rootFiles = append(lg.rootFiles, f+".meta_lic") 112 lg: lg, 124 lg.mu.Lock() 126 for _, f := range lg.rootFiles { 127 lg.targets[f] = nil 129 lg.mu.Unlock() 132 for _, f := range lg.rootFiles { [all …]
|
D | policy_resolve.go | 37 func ResolveBottomUpConditions(lg *LicenseGraph) { 38 TraceBottomUpConditions(lg, AllResolutions) 45 func TraceBottomUpConditions(lg *LicenseGraph, conditionsFn TraceConditions) { 48 lg.onceBottomUp.Do(func() { 83 dcs = depConditionsPropagatingToTarget(lg, edge, dcs, treatAsAggregate) 94 for _, rname := range lg.rootFiles { 95 rnode := lg.targets[rname] 107 func ResolveTopDownConditions(lg *LicenseGraph) { 108 TraceTopDownConditions(lg, AllResolutions) 114 func TraceTopDownConditions(lg *LicenseGraph, conditionsFn TraceConditions) { [all …]
|
D | policy_walk.go | 21 Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetEdge) interface{} 28 func (ctx NoEdgeContext) Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetEdge) interface… 39 func (ctx ApplicableConditionsContext) Context(lg *LicenseGraph, path TargetEdgePath, edge *TargetE… 44 return conditionsAttachingAcrossEdge(lg, edge, universe) 50 type VisitNode func(lg *LicenseGraph, target *TargetNode, path TargetEdgePath) bool 54 func WalkTopDown(ctx EdgeContextProvider, lg *LicenseGraph, visit VisitNode) { 59 visitChildren := visit(lg, fnode, *path) 68 edgeContext = ctx.Context(lg, *path, edge) 76 for _, r := range lg.rootFiles { 78 walk(lg.targets[r]) [all …]
|
D | policy_resolveshare.go | 18 func ResolveSourceSharing(lg *LicenseGraph) ResolutionSet { 19 ResolveTopDownConditions(lg) 20 return WalkResolutionsForCondition(lg, ImpliesShared)
|
D | policy_resolveprivacy.go | 18 func ResolveSourcePrivacy(lg *LicenseGraph) ResolutionSet { 19 ResolveTopDownConditions(lg) 20 return WalkResolutionsForCondition(lg, ImpliesPrivate)
|
D | policy_resolvenotices.go | 18 func ResolveNotices(lg *LicenseGraph) ResolutionSet { 19 ResolveTopDownConditions(lg) 20 return WalkResolutionsForCondition(lg, ImpliesNotice)
|
D | resolutionset_test.go | 77 lg := newLicenseGraph() 79 rsShare := toResolutionSet(lg, share) 101 rsPrivate := toResolutionSet(lg, proprietary) 120 lg := newLicenseGraph() 122 rsShare := toResolutionSet(lg, share) 126 if rsShare.AttachesToTarget(newTestNode(lg, "binc")) { 129 if !rsShare.AttachesToTarget(newTestNode(lg, "image")) {
|
D | test_util.go | 115 func newTestNode(lg *LicenseGraph, targetName string) *TargetNode { 116 if tn, alreadyExists := lg.targets[targetName]; alreadyExists { 120 lg.targets[targetName] = tn 240 func logGraph(lg *LicenseGraph, t *testing.T) { 243 for _, target := range lg.Targets() { 248 for _, edge := range lg.Edges() { 291 func toActionSet(lg *LicenseGraph, data []act) ActionSet { 294 actsOn := newTestNode(lg, a.actsOn) 307 func toResolutionSet(lg *LicenseGraph, data []res) ResolutionSet { 310 attachesTo := newTestNode(lg, r.attachesTo) [all …]
|
D | policy_resolveprivacy_test.go | 77 lg, err := toGraph(stderr, tt.roots, tt.edges) 82 expectedRs := toResolutionSet(lg, tt.expectedResolutions) 83 actualRs := ResolveSourcePrivacy(lg)
|
D | policy_resolve_test.go | 333 lg, err := toGraph(stderr, tt.roots, tt.edges) 339 logGraph(lg, t) 341 ResolveBottomUpConditions(lg) 342 actual := asActionList(lg) 346 expected := toActionList(lg, tt.expectedActions) 644 lg, err := toGraph(stderr, tt.roots, tt.edges) 650 logGraph(lg, t) 652 ResolveTopDownConditions(lg) 653 actual := asActionList(lg) 657 expected := toActionList(lg, tt.expectedActions)
|
D | policy_shareprivacyconflicts.go | 44 func ConflictingSharedPrivateSource(lg *LicenseGraph) []SourceSharePrivacyConflict { 46 ResolveTopDownConditions(lg) 48 combined := WalkActionsForCondition(lg, ImpliesShared.Union(ImpliesPrivate))
|
D | policy_shipped_test.go | 109 lg, err := toGraph(stderr, tt.roots, tt.edges) 115 for _, edge := range lg.Edges() { 119 nodeset := ShippedNodes(lg)
|
D | graph.go | 76 func (lg *LicenseGraph) Edges() TargetEdgeList { 77 edges := make(TargetEdgeList, 0, len(lg.edges)) 78 edges = append(edges, lg.edges...) 83 func (lg *LicenseGraph) Targets() TargetNodeList { 84 targets := make(TargetNodeList, 0, len(lg.targets)) 85 for _, target := range lg.targets { 92 func (lg *LicenseGraph) TargetNames() []string { 93 targets := make([]string, 0, len(lg.targets)) 94 for target := range lg.targets {
|
D | readgraph_test.go | 90 lg, err := ReadLicenseGraph(tt.fs, stderr, tt.roots) 103 if lg == nil { 108 for _, e := range lg.Edges() { 132 for _, t := range lg.Targets() {
|
D | policy_shareprivacyconflicts_test.go | 100 lg, err := toGraph(stderr, tt.roots, tt.edges) 105 expectedConflicts := toConflictList(lg, tt.expectedConflicts) 106 actualConflicts := ConflictingSharedPrivateSource(lg)
|
D | policy_resolveshare_test.go | 265 lg, err := toGraph(stderr, tt.roots, tt.edges) 270 expectedRs := toResolutionSet(lg, tt.expectedResolutions) 271 actualRs := ResolveSourceSharing(lg)
|
D | policy_walk_test.go | 603 lg, err := toGraph(stderr, tt.roots, tt.edges) 608 expectedRs := toResolutionSet(lg, tt.expectedResolutions) 609 ResolveTopDownConditions(lg) 610 actualRs := WalkResolutionsForCondition(lg, tt.condition) 1196 lg, err := toGraph(stderr, tt.roots, tt.edges) 1201 expectedAs := toActionSet(lg, tt.expectedActions) 1202 ResolveTopDownConditions(lg) 1203 actualAs := WalkActionsForCondition(lg, tt.condition) 1204 checkResolvesActions(lg, actualAs, expectedAs, t) 1376 lg, err := ReadLicenseGraph(GetFS(""), stderr, rootFiles) [all …]
|
D | policy_policy_test.go | 223 lg, err := ReadLicenseGraph(&fs, stderr, []string{tt.edge.target}) 228 edge := lg.Edges()[0] 239 lg.targets[otherTarget] = otn 257 csActual := depConditionsPropagatingToTarget(lg, edge, depConditions, tt.treatAsAggregate) 281 …cs := targetConditionsPropagatingToDep(lg, edge, targetConditions, tt.treatAsAggregate, AllResolut…
|
D | policy_policy.go | 175 func depConditionsPropagatingToTarget(lg *LicenseGraph, e *TargetEdge, depConditions LicenseConditi… 199 func targetConditionsPropagatingToDep(lg *LicenseGraph, e *TargetEdge, targetConditions LicenseCond… 230 func conditionsAttachingAcrossEdge(lg *LicenseGraph, e *TargetEdge, universe LicenseConditionSet) L…
|
D | policy_resolvenotices_test.go | 426 lg, err := toGraph(stderr, tt.roots, tt.edges) 431 expectedRs := toResolutionSet(lg, tt.expectedResolutions) 432 actualRs := ResolveNotices(lg)
|
D | noticeindex.go | 39 lg *LicenseGraph member 68 func IndexLicenseTexts(rootFS fs.FS, lg *LicenseGraph, rs ResolutionSet) (*NoticeIndex, error) { 70 rs = ResolveNotices(lg) 73 lg: lg, 76 shipped: ShippedNodes(lg), 158 WalkTopDown(NoEdgeContext{}, lg, func(lg *LicenseGraph, tn *TargetNode, path TargetEdgePath) bool { 235 files := make([]string, 0, len(ni.files) + len(ni.lg.targets) + len(projectMeta)) 237 for f := range ni.lg.targets {
|
/build/make/tools/compliance/cmd/sbom/ |
D | sbom.go | 311 func inputFiles(lg *compliance.LicenseGraph, pmix *projectmetadata.Index, licenseTexts []string) []… 313 targets := lg.TargetNames() 356 lg, err := compliance.ReadLicenseGraph(ctx.rootFS, ctx.stderr, files) 402 compliance.WalkTopDownBreadthFirst(nil, lg, 403 …func(lg *compliance.LicenseGraph, tn *compliance.TargetNode, path compliance.TargetEdgePath) bool { 519 deps := inputFiles(lg, pmix, licenseTexts)
|
/build/make/tools/compliance/cmd/dumpresolutions/ |
D | dumpresolutions_test.go | 946 func newTestCondition(lg *compliance.LicenseGraph, conditionName ...string) compliance.LicenseCondi… 957 func (tm *targetMatcher) matchString(ctx *testContext, lg *compliance.LicenseGraph) string { 958 cs := newTestCondition(lg, tm.conditions...) 977 func (rm *resolutionMatcher) matchString(ctx *testContext, lg *compliance.LicenseGraph) string { 978 cs := newTestCondition(lg, rm.conditions...) 3303 lg, err := dumpResolutions(&tt.ctx, stdout, stderr, compliance.GetFS(tt.outDir), rootFiles...) 3315 expectedOut.WriteString(m.matchString(ctx, lg))
|