Skip to content

Commit

Permalink
Fixes #583 correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
daveshanley committed Jan 2, 2025
1 parent e792212 commit 000d02d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions model/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ func (rr *RuleResultSet) GenerateSpectralReport(source string) []reports.Spectra
},
}
var path []string
// check for double dots in the path, and collapse them.
// https://github.com/daveshanley/vacuum/issues/583
if strings.Contains(result.Path, "..") {
result.Path = strings.ReplaceAll(result.Path, "..", ".")
}
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 000d02d

Please sign in to comment.