MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / NeedExclusion

Method NeedExclusion

opensca/sca/java/pom.go:94–106  ·  view source on GitHub ↗

NeedExclusion 判断是否是当前依赖需要排除的子依赖

(dep PomDependency)

Source from the content-addressed store, hash-verified

92
93// NeedExclusion 判断是否是当前依赖需要排除的子依赖
94func (pd PomDependency) NeedExclusion(dep PomDependency) bool {
95 check := func(s1, s2 string) bool {
96 return s1 == "" || s1 == "*" || s1 == s2
97 }
98 for _, e := range pd.Exclusions {
99 if check(e.GroupId, dep.GroupId) &&
100 check(e.ArtifactId, dep.ArtifactId) &&
101 check(e.Version, dep.Version) {
102 return true
103 }
104 }
105 return false
106}
107
108// GAV is groupId:artifactId:version
109func (pd PomDependency) GAV() string {

Callers 1

parsePomFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected