commands: use vendored formatter for lint responses

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2024-04-11 07:52:07 -07:00
parent da3435ed3a
commit 46cf94092c
No known key found for this signature in database
GPG Key ID: AFA9DE5F8AB7AF39
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,7 @@ import (
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
"github.com/moby/buildkit/frontend/subrequests"
"github.com/moby/buildkit/frontend/subrequests/lint"
"github.com/moby/buildkit/frontend/subrequests/outline"
"github.com/moby/buildkit/frontend/subrequests/targets"
"github.com/moby/buildkit/solver/errdefs"
@ -862,6 +863,8 @@ func printResult(f *controllerapi.PrintFunc, res map[string]string) error {
return printValue(targets.PrintTargets, targets.SubrequestsTargetsDefinition.Version, f.Format, res)
case "subrequests.describe":
return printValue(subrequests.PrintDescribe, subrequests.SubrequestsDescribeDefinition.Version, f.Format, res)
case "lint":
return printValue(lint.PrintLintViolations, lint.SubrequestLintDefinition.Version, f.Format, res)
default:
if dt, ok := res["result.json"]; ok && f.Format == "json" {
fmt.Println(dt)