Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Aug 2, 2023
1 parent 36797e8 commit 99101d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engine/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"regexp"
"strings"

"github.com/go-logr/logr"
"github.com/konveyor/analyzer-lsp/output/v1/konveyor"
Expand Down Expand Up @@ -265,8 +266,10 @@ func (ce ConditionEntry) Evaluate(ctx context.Context, log logr.Logger, condCtx
func incidentsToFilepaths(incident []IncidentContext) []string {
filepaths := []string{}
for _, ic := range incident {
if _, err := uri.Parse(string(ic.FileURI)); err == nil {
if strings.HasPrefix(string(ic.FileURI), uri.FileScheme) {
filepaths = append(filepaths, ic.FileURI.Filename())
} else {
filepaths = append(filepaths, string(ic.FileURI))
}
}
return filepaths
Expand Down

0 comments on commit 99101d0

Please sign in to comment.