Skip to content

Commit

Permalink
Merge pull request #118 from snyk/fix/scopekey-error-in-plugin-inspect
Browse files Browse the repository at this point in the history
fix: filter out configs where isPublic is false
  • Loading branch information
ola magdziarek committed Nov 1, 2022
2 parents 3aff460 + 179e8c2 commit 63e5c44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions scala/SnykSbtPlugin-0.1x.scala
Expand Up @@ -88,10 +88,8 @@ object SnykSbtPlugin extends AutoPlugin {

val thisProjectId = formatModuleId((moduleGraph in Compile).value.roots.head.id)
val thisProjectConfigs = thisProject.value.configurations.filterNot { c =>
ConfigBlacklist.contains(c.name)
ConfigBlacklist.contains(c.name) || !c.isPublic
}
println(">>> Project's configurations after filtering blacklisted:")
println(thisProjectConfigs)
val filter = ScopeFilter(configurations = inConfigurations(thisProjectConfigs: _*))
val configAndModuleGraph = Def.task {
val graph = moduleGraph.value
Expand Down
5 changes: 1 addition & 4 deletions scala/SnykSbtPlugin-1.2x.scala
Expand Up @@ -84,15 +84,12 @@ object SnykSbtPlugin extends AutoPlugin {

val thisProjectId = formatModuleId((Compile / moduleGraph).value.roots.head.id)
val thisProjectConfigs = thisProject.value.configurations.filterNot { c =>
ConfigBlacklist.contains(c.name)
ConfigBlacklist.contains(c.name) || !c.isPublic
}
println(">>> Project's configurations after filtering blacklisted:")
println(thisProjectConfigs)
val filter = ScopeFilter(configurations = inConfigurations(thisProjectConfigs: _*))
val configAndModuleGraph = Def.task {
val graph = moduleGraph.value
val configName = configuration.value.name

configName -> graph
}

Expand Down

0 comments on commit 63e5c44

Please sign in to comment.