Documentation
¶
Overview ¶
Package static reads the modules to lint from a working tree: the full source as committed, rendered the way Deckhouse would render it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Source)
Option customizes a Source at construction time.
func WithMatrix ¶
WithMatrix enables matrix mode with the given per-module combination limit. A non-positive limit falls back to the matrix package default. It is the programmatic equivalent of the --matrix / --matrix-limit flags, and lets callers (e.g. tests running cases in parallel) opt in without touching process-global flags.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source reads modules from a directory on disk.
func (*Source) Close ¶
func (s *Source) Close()
Close has nothing to release: the modules are the caller's own files.
func (*Source) ConfigDir ¶
ConfigDir is the linted directory itself: .dmtlint.yaml is looked up from the tree it configures.
func (*Source) Targets ¶
func (s *Source) Targets( _ context.Context, cfg *config.RootConfig, errorList *errors.LintRuleErrorsList, yield func(manager.Target) bool, ) error
Targets walks the tree for modules and builds each one. A module that cannot be read is reported as a finding and skipped, not returned as an error: one broken module must not cost the caller the findings of every other.
Modules are handed to yield as they are built rather than collected: under --matrix one module becomes many renders, and yield blocks while the linters are busy, so only a bounded number of them is ever resident.