mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit v0.14.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
8
vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go
generated
vendored
8
vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go
generated
vendored
@ -108,7 +108,7 @@ func (results *LintResults) ToResult() (*client.Result, error) {
|
||||
res.AddMeta("result.txt", b.Bytes())
|
||||
|
||||
status := 0
|
||||
if len(results.Warnings) > 0 {
|
||||
if len(results.Warnings) > 0 || results.Error != nil {
|
||||
status = 1
|
||||
}
|
||||
res.AddMeta("result.statuscode", []byte(fmt.Sprintf("%d", status)))
|
||||
@ -169,11 +169,11 @@ func PrintLintViolations(dt []byte, w io.Writer) error {
|
||||
})
|
||||
|
||||
for _, warning := range results.Warnings {
|
||||
fmt.Fprintf(w, "%s", warning.RuleName)
|
||||
fmt.Fprintf(w, "\nWARNING: %s", warning.RuleName)
|
||||
if warning.URL != "" {
|
||||
fmt.Fprintf(w, " - %s", warning.URL)
|
||||
}
|
||||
fmt.Fprintf(w, "\n%s\n", warning.Description)
|
||||
fmt.Fprintf(w, "\n%s\n", warning.Detail)
|
||||
|
||||
if warning.Location.SourceIndex < 0 {
|
||||
continue
|
||||
@ -187,8 +187,8 @@ func PrintLintViolations(dt []byte, w io.Writer) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprintln(w)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user