Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrVerifyFailed = errors.New("verify failed")
ErrVerifyFailed is returned by Verify when one or more linters report errors.
Functions ¶
func Verify ¶
Verify runs all linters against the selected package sources and prints the results. By default it verifies the current package directory using the static settings scope; when Options.Remote is set, it verifies whichever published images that target selects, each against its own remote settings scope.
Types ¶
type Options ¶
type Options struct {
HideWarnings bool // suppress Warn-level diagnostics from output
ShowIgnored bool // include Ignored-level diagnostics in output
LintConfig string // lint config path to use instead of package-relative discovery
Remote RemoteTarget // published package to verify instead of the current directory
}
Options controls what is verified and which diagnostic severities are surfaced.
type RemoteTarget ¶ added in v0.33.5
type RemoteTarget struct {
// Repository is the package repository path, <registry-path>/<package>, without a tag.
Repository string
// Version tags both images and identifies the published version to verify.
// Empty resolves to the highest version published in the repository.
Version string
// Release additionally verifies the release image published for Version.
Release bool
}
RemoteTarget addresses a published package version. Build publishes two images per version under the same tag, so one version selects both: the bundle image is always verified, and Release opts the release image in alongside it.
func (RemoteTarget) BundleRef ¶ added in v0.33.5
func (t RemoteTarget) BundleRef() string
BundleRef returns the reference of the bundle image, <repository>:<version>.
func (RemoteTarget) Enabled ¶ added in v0.33.5
func (t RemoteTarget) Enabled() bool
Enabled reports whether remote verification was requested.
func (RemoteTarget) ReleaseRef ¶ added in v0.33.5
func (t RemoteTarget) ReleaseRef() string
ReleaseRef returns the reference of the release image, <repository>/version:<version>.
func (RemoteTarget) Validate ¶ added in v0.33.5
func (t RemoteTarget) Validate() error
Validate reports whether the target names a repository. The version is optional: an unset one is resolved from the tags the repository publishes.
Directories
¶
| Path | Synopsis |
|---|---|
|
doc
Package doc serves the reference documentation for the verify linters and their rules, as printed by `package doc`.
|
Package doc serves the reference documentation for the verify linters and their rules, as printed by `package doc`. |
|
linters/icon
Package icon validates package-icon content (format, size, dimensions).
|
Package icon validates package-icon content (format, size, dimensions). |
|
linters/oss
Package oss validates optional oss.yaml package metadata.
|
Package oss validates optional oss.yaml package metadata. |
|
linters/package
Package pkglint holds the linter that inspects the package as an artifact: the shape of its root, and the metadata that describes it.
|
Package pkglint holds the linter that inspects the package as an artifact: the shape of its root, and the metadata that describes it. |
|
settings
Package settings maps the on-disk .pkglint.yaml document onto typed configuration and converts it into runtime-ready linter severities.
|
Package settings maps the on-disk .pkglint.yaml document onto typed configuration and converts it into runtime-ready linter severities. |