Skip to content

Commit

Permalink
Show description in FindResourceMissingConfiguration marker
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Aug 9, 2024
1 parent b711be6 commit 4de5c22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Yaml.Mapping.Entry visitMappingEntry(Yaml.Mapping.Entry entry, AtomicBool
return bool.get() ? entry : super.visitMappingEntry(entry, bool);
}
}.visitNonNull(resource.getTree(), pathFound, requireNonNull(resource.getCursor().getParent()));
return pathFound.get() ? resource.getTree() : SearchResult.found(resource.getTree());
return pathFound.get() ? resource.getTree() : SearchResult.found(resource.getTree(), "missing: " + configurationPath);
});

if (fileMatcher != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void podLivenessProbe() {
image: <image>
""",
"""
~~>apiVersion: v1
~~(missing: $.spec.containers[*].livenessProbe)~~>apiVersion: v1
kind: Pod
spec:
containers:
Expand Down Expand Up @@ -160,7 +160,7 @@ void missingPodLivenessProbe() {
- image: nginx:latest
""",
"""
~~>apiVersion: apps/v1
~~(missing: $.spec.containers[:1].livenessProbe)~~>apiVersion: apps/v1
kind: Pod
metadata:
labels:
Expand Down Expand Up @@ -192,7 +192,7 @@ void cpuLimitsMissing() {
- image: nginx:latest
""",
"""
~~>apiVersion: apps/v1
~~(missing: ..spec.containers[:1].resources.limits.cpu)~~>apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down

0 comments on commit 4de5c22

Please sign in to comment.