Skip to content

Commit

Permalink
update check template link to return html anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
maryfrances01 committed Oct 28, 2023
1 parent 0cb8ce5 commit 9728f1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/command/checks/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"sort"
"strings"
"text/template"
"fmt"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand All @@ -14,6 +15,7 @@ import (
"golang.stackrox.io/kube-linter/pkg/command/common"
"golang.stackrox.io/kube-linter/pkg/config"
"golang.stackrox.io/kube-linter/pkg/templates"
"golang.stackrox.io/kube-linter/internal/consts"
)

const (
Expand Down Expand Up @@ -116,5 +118,5 @@ func GetTemplateLink(check *config.Check) (string, error) {
if !found {
return "", errors.Errorf("unexpected: check %v references non-existent template?", check)
}
return strings.Join(strings.Fields(strings.ToLower(t.HumanName)), "-"), nil
return fmt.Sprintf(consts.TemplateURLFormat, strings.Join(strings.Fields(strings.ToLower(t.HumanName)), "-")), nil
}

0 comments on commit 9728f1c

Please sign in to comment.