Documentation ¶
Index ¶
- Constants
- Variables
- func GetDockerfilesLintResults(ctx context.Context, opts Options, dockerCfg docker.Config) (*[]Result, error)
- func GetK8sManifestsLintResults(ctx context.Context, opts Options) (*[]Result, error)
- func GetSkaffoldYamlsLintResults(ctx context.Context, opts Options) (*[]Result, error)
- func Lint(ctx context.Context, out io.Writer, opts Options, dockerCfg docker.Config) error
- func OutputFormatter(out io.Writer, opt string) format.Formatter
- type ConfigFile
- type DockerCommandFilter
- type DockerfileCommandLinter
- type InputParams
- type Linter
- type Options
- type Result
- type Rule
- type RuleID
- type RuleType
- type YamlFieldFilter
- type YamlFieldLinter
Constants ¶
View Source
const ( PlainTextOutput string = "plain-text" JSONOutput string = "json" )
Variables ¶
View Source
var DockerfileLinters = []Linter{ &DockerfileCommandLinter{}, }
View Source
var K8sManifestLinters = []Linter{ &YamlFieldLinter{}, }
View Source
var SkaffoldYamlLinters = []Linter{ &YamlFieldLinter{}, }
Functions ¶
Types ¶
type ConfigFile ¶
type DockerCommandFilter ¶
type DockerfileCommandLinter ¶
type DockerfileCommandLinter struct{}
func (*DockerfileCommandLinter) Lint ¶
func (*DockerfileCommandLinter) Lint(params InputParams, rules *[]Rule) (*[]Result, error)
type InputParams ¶
type Options ¶
type Options struct { // Filename is the `skaffold.yaml` file path Filename string // RemoteCacheDir is the directory for the remote cache RemoteCacheDir string // OutFormat is the output format. One of: json OutFormat string // Modules is the module filter for specific commands Modules []string // Profiles is the slice of profile names to activate. Profiles []string }
Options holds flag values for the various `skaffold lint` commands
type Result ¶
type Rule ¶
type Rule struct { RuleID RuleID RuleType RuleType ExplanationTemplate string Severity protocol.DiagnosticSeverity Filter interface{} ExplanationPopulator func(InputParams) (explanationInfo, error) `json:"-"` LintConditions []func(InputParams) bool `json:"-"` }
type RuleID ¶
type RuleID int
const ( DummyRuleIDForTesting RuleID = iota SkaffoldYamlAPIVersionOutOfDate SkaffoldYamlUseStaticPort SkaffoldYamlSyncPython DockerfileCopyOver1000Files DockerfileCopyContainsGitDir K8sManifestManagedByLabelInUse // TODO(aaron-prindle) see if it makes sense to add a rule type for each validation error possibility ValidationError )
type YamlFieldFilter ¶
type YamlFieldLinter ¶
type YamlFieldLinter struct{}
func (*YamlFieldLinter) Lint ¶
func (*YamlFieldLinter) Lint(lintInputs InputParams, rules *[]Rule) (*[]Result, error)
Click to show internal directories.
Click to hide internal directories.