diff --git a/cli/print/lint.go b/cli/print/lint.go index 83f0f1872..74aeb35c1 100644 --- a/cli/print/lint.go +++ b/cli/print/lint.go @@ -7,9 +7,9 @@ import ( "github.com/replicatedhq/replicated/pkg/types" ) -var lintTmplSrc = `RULE TYPE LINE MESSAGE +var lintTmplSrc = `RULE TYPE FILENAME LINE MESSAGE {{ range . -}} -{{ .Rule }} {{ .Type }} {{with .Positions}}{{ (index . 0).Start.Line }}{{else}} {{end}} {{ .Message}} +{{ .Rule }} {{ .Type }} {{ .Path }} {{with .Positions}}{{ (index . 0).Start.Line }}{{else}} {{end}} {{ .Message}} {{ end }}` var lintTmpl = template.Must(template.New("lint").Parse(lintTmplSrc)) diff --git a/client/release.go b/client/release.go index 1c53257a3..b182cbcaa 100644 --- a/client/release.go +++ b/client/release.go @@ -160,7 +160,7 @@ func (c *Client) PromoteRelease(appID string, appType string, sequence int64, la func (c *Client) LintRelease(appID string, appType string, yamlOrJSON string) ([]types.LintMessage, error) { if appType == "platform" { - return nil, errors.New("Linting is not yet supported for Platform applications") + return nil, errors.New("Linting is not yet supported in this CLI, please install github.com/replicatedhq/replicated-lint to lint this application") // return c.PlatformClient.LintRelease(appID, yamlOrJSON) } else if appType == "ship" { return c.ShipClient.LintRelease(appID, yamlOrJSON) diff --git a/pkg/types/release.go b/pkg/types/release.go index 8be4e1fda..97d70ff22 100644 --- a/pkg/types/release.go +++ b/pkg/types/release.go @@ -15,12 +15,13 @@ type ReleaseInfo struct { type LintMessage struct { Rule string `json:"rule"` Type string `json:"type"` + Path string `json:"path"` Message string `json:"message"` Positions []*LintPosition `json:"positions"` } type LintPosition struct { - Path string `json:"path"` + Path string `json:"path"` Start LintLinePosition `json:"start"` End LintLinePosition `json:"end"` }