modulefix

package
v1.45.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package modulefix implements the shared module-deprecation auto-fix used by both the manifest and project-manifest linters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModulePath

func ModulePath(name string, i int) string

ModulePath builds the finding path for module i, preferring its name over its slice index. Shared so the checker and fixer produce identical paths.

Types

type Applied

type Applied struct {
	Path    string
	Message string
}

Applied records one fix the fixer made, for logging. Path mirrors the corresponding lint.Finding.Path (e.g. "modules.<name>.prerelease").

func FixModules

func FixModules(root *yaml.Node) []Applied

FixModules walks the modules: sequence in root (a manifest/service root mapping node) and applies the safe module-field migrations in place, returning what it changed. A missing or non-sequence modules: key is a no-op.

Jump to

Keyboard shortcuts

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