Skip to content

Commit

Permalink
Addressed issue #583
Browse files Browse the repository at this point in the history
A double dot (deep search) will cause gaps in a spectral path property, this has been fixed.

This is still not a full complete fix, because the JSON path for results is calculated by the doctor, and this looks like a straight passthrough from the rule, which needs further investigation.
  • Loading branch information
daveshanley committed Nov 19, 2024
1 parent 5e6a452 commit c86b0fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func (rr *RuleResultSet) GenerateSpectralReport(source string) []reports.Spectra
var path []string
pathArr := strings.Split(result.Path, ".")
for _, pItem := range pathArr {
if pItem == "" {
path = append(path, "..") // https://github.com/daveshanley/vacuum/issues/583
}
if pItem != "$" {

p := paramRegex.FindStringSubmatch(pItem)
Expand Down

0 comments on commit c86b0fe

Please sign in to comment.