Documentation
¶
Overview ¶
Package remote lints a module as it was published, rather than as it sits in a working tree: it pulls the two images a release produces and runs the scopes that belong to them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source reads a module from the two images published under an image path, e.g. registry.example.com/my-module:v0.0.1.
func NewSource ¶
NewSource resolves the image path up front, so an unusable reference fails before the run prints anything.
func (*Source) Close ¶
func (s *Source) Close()
Close removes the extraction directories. It runs after the findings are printed, which is why every remote rule reports a module-relative path.
func (*Source) ConfigDir ¶
ConfigDir is the caller's working directory: the image ships no .dmtlint.yaml, so severities come from the config next to whoever started the run — read from its `remote.bundle` and `remote.release` sections rather than the ones the source tree uses.
func (*Source) Targets ¶
func (s *Source) Targets( ctx context.Context, cfg *config.RootConfig, _ *errors.LintRuleErrorsList, yield func(manager.Target) bool, ) error
Targets pulls and unpacks both images. Both are attempted before either error is returned: a registry failure on one must not cost the caller what the other holds.