remote

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

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 Options

type Options struct {
	// Login is the username to use for the registry, e.g. license-token.
	Login string
	// Password is the password to use for the registry.
	Password string
}

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

func NewSource(imagePath string, opts *Options) (*Source, error)

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

func (s *Source) ConfigDir() string

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) Scopes

func (s *Source) Scopes() []scopes.Scope

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL