Skip to content

Commit

Permalink
Revert "Add DependenciesInUse"
Browse files Browse the repository at this point in the history
This reverts commit 113661e.
  • Loading branch information
jkschneider committed Jul 15, 2024
1 parent e9f3950 commit dceb376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ description = "Rewrite Docker recipes."
val rewriteVersion = rewriteRecipe.rewriteVersion.get()
dependencies {
implementation(platform("org.openrewrite:rewrite-bom:$rewriteVersion"))
implementation("org.openrewrite:rewrite-core")
implementation("org.openrewrite:rewrite-maven")
implementation("org.openrewrite:rewrite-core:$rewriteVersion")
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.openrewrite.docker.DockerImageVersion;
import org.openrewrite.docker.table.DockerBaseImages;
import org.openrewrite.marker.SearchResult;
import org.openrewrite.maven.table.DependenciesInUse;

import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -31,12 +30,6 @@
public class FindDockerImageUses extends Recipe {
transient DockerBaseImages dockerBaseImages = new DockerBaseImages(this);

/**
* This is a bit of a stretch, but helps us to use pre-existing visualizations for
* categorizing dependency use.
*/
transient DependenciesInUse dependenciesInUse = new DependenciesInUse(this);

@Override
public String getDisplayName() {
return "Find uses of docker base images";
Expand All @@ -53,14 +46,9 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
List<DockerImageVersion> froms = docker.getFroms();
if (!froms.isEmpty()) {
for (DockerImageVersion from : froms) {
String version = from.getVersion() == null ? "" : from.getVersion();
dockerBaseImages.insertRow(ctx, new DockerBaseImages.Row(
from.getImageName(),
version
));
dependenciesInUse.insertRow(ctx, new DependenciesInUse.Row(
"", "docker", "", from.getImageName(),
version, null, "", 0
from.getVersion() == null ? "" : from.getVersion()
));
}
return SearchResult.found(docker.getTree(),
Expand Down

0 comments on commit dceb376

Please sign in to comment.