package lint

import "github.com/moby/buildkit/frontend/subrequests/lint"

Index

Constants

const RequestLint = "frontend.lint"

Variables

var SubrequestLintDefinition = subrequests.Request{
	Name:        RequestLint,
	Version:     "1.0.0",
	Type:        subrequests.TypeRPC,
	Description: "Lint a Dockerfile",
	Opts:        []subrequests.Named{},
	Metadata: []subrequests.Named{
		{Name: "result.json"},
		{Name: "result.txt"},
		{Name: "result.statuscode"},
	},
}

Functions

func PrintLintViolations

func PrintLintViolations(dt []byte, w io.Writer) error

Types

type BuildError

type BuildError struct {
	Message  string      `json:"message"`
	Location pb.Location `json:"location"`
}

type LintResults

type LintResults struct {
	Warnings []Warning        `json:"warnings"`
	Sources  []*pb.SourceInfo `json:"sources"`
	Error    *BuildError      `json:"buildError,omitempty"`
}

func (*LintResults) AddSource

func (results *LintResults) AddSource(sourceMap *llb.SourceMap) int

func (*LintResults) AddWarning

func (results *LintResults) AddWarning(rulename, description, url, fmtmsg string, sourceIndex int, location []parser.Range)

func (*LintResults) ToResult

func (results *LintResults) ToResult() (*client.Result, error)

type Warning

type Warning struct {
	RuleName    string      `json:"ruleName"`
	Description string      `json:"description,omitempty"`
	URL         string      `json:"url,omitempty"`
	Detail      string      `json:"detail,omitempty"`
	Location    pb.Location `json:"location,omitempty"`
}

Source Files

lint.go

Version
v0.15.0-rc2
Published
Jul 10, 2024
Platform
js/wasm
Imports
12 packages
Last checked
1 minute ago

Tools for package owners.