Remove unread private transport members
This commit is contained in:
@@ -26,7 +26,6 @@ const (
|
||||
|
||||
type sourceVersionAncestor struct {
|
||||
path Path
|
||||
kind document.Kind
|
||||
}
|
||||
|
||||
type sourceVersionEvidence struct {
|
||||
@@ -38,8 +37,6 @@ type sourceVersionEvidence struct {
|
||||
version Version
|
||||
location *Location
|
||||
ancestors []sourceVersionAncestor
|
||||
absence sourceVersionPathAbsence
|
||||
checked bool
|
||||
redacted bool
|
||||
}
|
||||
|
||||
@@ -239,7 +236,6 @@ func processSourceVersionWithDirectiveContext(root *document.Node, rule *Version
|
||||
evidence := &sourceVersionEvidence{
|
||||
path: rule.Path.clone(), resolvedPath: resolved.resolvedPath,
|
||||
destination: destination.clone(), ancestors: resolved.ancestors,
|
||||
absence: resolved.absence,
|
||||
}
|
||||
location := resolved.nearest
|
||||
if resolved.present {
|
||||
@@ -277,7 +273,6 @@ func processSourceVersionWithDirectiveContext(root *document.Node, rule *Version
|
||||
}
|
||||
}
|
||||
|
||||
evidence.checked = true
|
||||
result.diagnostics = canonicalDiagnostics(reportVersion(rule, interpreted.version, root))
|
||||
if hasErrors(result.diagnostics) {
|
||||
evidence.redactText()
|
||||
@@ -334,7 +329,7 @@ func resolveSourceVersionPath(root *document.Node, path Path) sourceVersionPath
|
||||
}
|
||||
current := root
|
||||
resolved.nearest = current.Location
|
||||
resolved.ancestors = append(resolved.ancestors, sourceVersionAncestor{kind: current.Kind})
|
||||
resolved.ancestors = append(resolved.ancestors, sourceVersionAncestor{})
|
||||
for position, segment := range path.segments {
|
||||
switch current.Kind {
|
||||
case document.Mapping:
|
||||
@@ -373,7 +368,7 @@ func resolveSourceVersionPath(root *document.Node, path Path) sourceVersionPath
|
||||
}
|
||||
resolved.nearest = current.Location
|
||||
resolved.ancestors = append(resolved.ancestors, sourceVersionAncestor{
|
||||
path: Path{segments: clonePathSegments(resolved.resolvedPath.segments[:position+1], 0)}, kind: current.Kind,
|
||||
path: Path{segments: clonePathSegments(resolved.resolvedPath.segments[:position+1], 0)},
|
||||
})
|
||||
}
|
||||
resolved.node = current
|
||||
|
||||
Reference in New Issue
Block a user