linter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	File    string
	Field   string
	Message string
}

func LintCatalogDir

func LintCatalogDir(dir string) []Finding

LintCatalogDir walks dir one level deep and lints every <entry>/pkg.yaml.

func LintFile

func LintFile(pkgYamlPath string) []Finding

func LintPackageDir

func LintPackageDir(dir string) []Finding

type InstallProbe

type InstallProbe func(ctx context.Context, name string) (latestVersion string, err error)

InstallProbe runs install + test for one package against a prepared NEM_HOME. Injected to keep internal/linter free of internal/app.

type Result

type Result struct {
	Findings  []Finding
	Manifests []string
}

func Lint

func Lint(path string) (Result, error)

Lint returns an operational error only when path cannot be stat'd; per-manifest problems are Findings.

func LintWithInstall

func LintWithInstall(ctx context.Context, path string, userAuth auth.Config, probe InstallProbe) (Result, error)

LintWithInstall runs Lint(path) then drives probe against every manifest that passed the offline checks. On a fatal install-pass error, any findings accumulated so far are still returned alongside the error.

Jump to

Keyboard shortcuts

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