config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package config handles configuration loading and saving for sley.

The configuration system uses a priority hierarchy for determining the version file path:

  1. --path flag (highest priority)
  2. SLEY_PATH environment variable
  3. .sley.yaml configuration file
  4. Default ".version" (lowest priority)

Configuration File Format

The configuration file (.sley.yaml) supports the following options:

# Path to the version file
path: internal/version/.version

# Plugin configuration
plugins:
  commit-parser: true

# Extension configuration
# Extensions are external scripts that hook into version lifecycle events.
# See docs/EXTENSIONS.md for details on creating extensions.
extensions:
  - name: my-extension        # Extension identifier
    path: ./extensions/my-ext # Path to extension directory
    enabled: true             # Whether extension is active

  - name: git-changelog
    path: /home/user/.sley-extensions/git-changelog
    enabled: true

  - name: legacy-notifier
    path: ./extensions/notifier
    enabled: false            # Disabled extensions are ignored

# Pre-release hooks (executed before version bumps)
pre-release-hooks:
  - command: "make test"
  - command: "make lint"

Workspace Configuration (Monorepo Support)

The workspace section configures multi-module/monorepo behavior:

workspace:
  # Auto-discovery settings (all optional, shown with defaults)
  discovery:
    enabled: true      # Enable module auto-discovery
    recursive: true    # Search subdirectories
    module_max_depth: 10      # Maximum directory depth
    exclude:           # Additional paths to exclude
      - custom_dir

  # Explicit module definitions (overrides discovery)
  modules:
    - name: module-a
      path: ./module-a/.version
    - name: module-b
      path: ./services/module-b/.version
      enabled: false   # Disable this module

Discovery is zero-config by default. The following patterns are excluded: node_modules, .git, vendor, tmp, build, dist, .cache, __pycache__

Helper methods:

  • GetDiscoveryConfig() returns discovery settings with defaults applied
  • GetExcludePatterns() returns merged default + configured excludes
  • HasExplicitModules() returns true if modules are explicitly defined
  • IsModuleEnabled(name) checks if a specific module is enabled

Security

Configuration files are created with 0600 permissions (owner read/write only) to protect any sensitive hook commands from being readable by other users.

Index

Constants

View Source
const ConfigFilePerm = core.PermOwnerRW

ConfigFilePerm defines secure file permissions for config files (owner read/write only). References core.PermOwnerRW for consistency across the codebase.

Variables

View Source
var (
	LoadConfigFn = loadConfig
	SaveConfigFn = func(cfg *Config) error {
		return defaultConfigSaver.Save(cfg)
	}
)

LoadConfigFn and SaveConfigFn are kept for backward compatibility during migration. They delegate to the interface-based implementations.

View Source
var DefaultExcludePatterns = []string{
	"node_modules",
	".git",
	"vendor",
	"tmp",
	"build",
	"dist",
	".cache",
	"__pycache__",
}

DefaultExcludePatterns returns the default patterns to exclude during module discovery.

Functions

func ErrorCount

func ErrorCount(results []ValidationResult) int

ErrorCount returns the number of failed validations.

func HasErrors

func HasErrors(results []ValidationResult) bool

HasErrors returns true if any validation failed.

func NormalizeVersionPath

func NormalizeVersionPath(path string) string

NormalizeVersionPath ensures the path is a file, not just a directory.

func WarningCount

func WarningCount(results []ValidationResult) int

WarningCount returns the number of warnings.

Types

type AuditLogConfig

type AuditLogConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// Path is the path to the audit log file.
	Path string `yaml:"path,omitempty"`

	// Format specifies the output format: json or yaml.
	Format string `yaml:"format,omitempty"`

	// IncludeAuthor includes git author in log entries.
	IncludeAuthor bool `yaml:"include-author,omitempty"`

	// IncludeTimestamp includes ISO 8601 timestamp in log entries.
	IncludeTimestamp bool `yaml:"include-timestamp,omitempty"`

	// IncludeCommitSHA includes current commit SHA in log entries.
	IncludeCommitSHA bool `yaml:"include-commit-sha,omitempty"`

	// IncludeBranch includes current branch name in log entries.
	IncludeBranch bool `yaml:"include-branch,omitempty"`
}

AuditLogConfig holds configuration for the audit log plugin.

func (*AuditLogConfig) GetFormat

func (c *AuditLogConfig) GetFormat() string

GetFormat returns the format with default "json".

func (*AuditLogConfig) GetPath

func (c *AuditLogConfig) GetPath() string

GetPath returns the path with default ".version-history.json".

type ChangelogGeneratorConfig

type ChangelogGeneratorConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// Mode determines output style: "versioned", "unified", or "both".
	// "versioned" writes each version to a separate file (e.g., .changes/v1.2.3.md)
	// "unified" writes to a single CHANGELOG.md file
	// "both" writes to both locations
	Mode string `yaml:"mode,omitempty"`

	// Format determines the changelog format: "grouped" or "keepachangelog".
	// "grouped" (default): Custom group labels with commit type grouping
	// "keepachangelog": Keep a Changelog specification format with standard sections
	Format string `yaml:"format,omitempty"`

	// ChangesDir is the directory for version-specific changelog files (versioned mode).
	ChangesDir string `yaml:"changes-dir,omitempty"`

	// ChangelogPath is the path to the unified changelog file.
	ChangelogPath string `yaml:"changelog-path,omitempty"`

	// HeaderTemplate is the path to a custom header template file.
	HeaderTemplate string `yaml:"header-template,omitempty"`

	// Repository contains git repository settings for link generation.
	// Supports GitHub, GitLab, Codeberg, Gitea, Bitbucket, and custom hosts.
	Repository *RepositoryConfig `yaml:"repository,omitempty"`

	// Groups defines commit grouping rules.
	Groups []CommitGroupConfig `yaml:"groups,omitempty"`

	// ExcludePatterns lists regex patterns for commits to exclude.
	ExcludePatterns []string `yaml:"exclude-patterns,omitempty"`

	// IncludeNonConventional includes commits that don't follow conventional commit format
	// in an "Other Changes" section. When false (default), these commits are skipped
	// and a warning is printed listing the skipped commits.
	IncludeNonConventional bool `yaml:"include-non-conventional,omitempty"`

	// UseDefaultIcons enables predefined icons for all commit groups and contributors.
	// When true, default icons (emojis) are automatically applied to commit group headers
	// and the contributors section. User-defined GroupIcons or Contributors.Icon values
	// will override the defaults for specific entries. This is a convenient shorthand
	// instead of manually specifying all icons via group-icons.
	UseDefaultIcons bool `yaml:"use-default-icons,omitempty"`

	// GroupIcons maps default group labels to icons. Use this to add icons to default
	// groups without redefining patterns and labels. Ignored if Groups is specified.
	// Keys must match default labels: Enhancements, Fixes, Refactors, Documentation,
	// Performance, Styling, Tests, Chores, CI, Build, Reverts.
	GroupIcons map[string]string `yaml:"group-icons,omitempty"`

	// BreakingChangesIcon is the icon/emoji for the breaking changes section header.
	// Used by formatters with a dedicated breaking changes section (e.g., GitHub format).
	// When UseDefaultIcons is true and this is empty, the default icon is used.
	BreakingChangesIcon string `yaml:"breaking-changes-icon,omitempty"`

	// Contributors configures the contributors section.
	Contributors *ContributorsConfig `yaml:"contributors,omitempty"`

	// MergeAfter controls when versioned changelog files are merged into the unified changelog.
	// Values:
	// - "immediate" (merge right after generation)
	// - "manual" (no auto-merge, default)
	// - "prompt" (interactive confirmation, auto-skips in CI/non-interactive environments).
	MergeAfter string `yaml:"merge-after,omitempty"`
}

ChangelogGeneratorConfig holds configuration for the changelog generator plugin.

func (*ChangelogGeneratorConfig) GetChangelogPath

func (c *ChangelogGeneratorConfig) GetChangelogPath() string

GetChangelogPath returns the changelog path with default "CHANGELOG.md".

func (*ChangelogGeneratorConfig) GetChangesDir

func (c *ChangelogGeneratorConfig) GetChangesDir() string

GetChangesDir returns the changes directory with default ".changes".

func (*ChangelogGeneratorConfig) GetFormat

func (c *ChangelogGeneratorConfig) GetFormat() string

GetFormat returns the format with default "grouped".

func (*ChangelogGeneratorConfig) GetMergeAfter added in v0.7.0

func (c *ChangelogGeneratorConfig) GetMergeAfter() string

GetMergeAfter returns the merge-after setting with default "manual".

func (*ChangelogGeneratorConfig) GetMode

func (c *ChangelogGeneratorConfig) GetMode() string

GetMode returns the mode with default "versioned".

type ChangelogParserConfig

type ChangelogParserConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// Path is the path to the changelog file (default: "CHANGELOG.md").
	Path string `yaml:"path,omitempty"`

	// RequireUnreleasedSection enforces presence of Unreleased section.
	RequireUnreleasedSection bool `yaml:"require-unreleased-section,omitempty"`

	// InferBumpType enables automatic bump type inference from changelog.
	InferBumpType bool `yaml:"infer-bump-type,omitempty"`

	// Priority determines which parser takes precedence: "changelog" or "commits"
	Priority string `yaml:"priority,omitempty"`

	// Format specifies the changelog format: keepachangelog, grouped, github, minimal, auto.
	// Default: keepachangelog (for backward compatibility).
	Format string `yaml:"format,omitempty"`

	// GroupedSectionMap provides custom section-to-category mapping for grouped format.
	// Keys are section names as they appear in the changelog (e.g., "Features", "Bug Fixes").
	// Values are semantic categories (Added, Changed, Fixed, Removed, Deprecated, Security).
	GroupedSectionMap map[string]string `yaml:"grouped-section-map,omitempty"`
}

ChangelogParserConfig holds configuration for the changelog parser plugin.

func (*ChangelogParserConfig) GetFormat added in v0.8.0

func (c *ChangelogParserConfig) GetFormat() string

GetFormat returns the format with default "keepachangelog".

func (*ChangelogParserConfig) GetPath added in v0.8.0

func (c *ChangelogParserConfig) GetPath() string

GetPath returns the path with default "CHANGELOG.md".

type CommitGroupConfig

type CommitGroupConfig struct {
	// Pattern is the regex pattern to match commit types.
	Pattern string `yaml:"pattern"`

	// Label is the section header label.
	Label string `yaml:"label"`

	// Icon is the icon/emoji for the section (optional).
	Icon string `yaml:"icon,omitempty"`

	// Order determines the display order (lower = higher priority).
	Order int `yaml:"order,omitempty"`
}

CommitGroupConfig defines a grouping rule for commits.

type Config

type Config struct {
	Path            string                            `yaml:"path"`
	Plugins         *PluginConfig                     `yaml:"plugins,omitempty"`
	Extensions      []ExtensionConfig                 `yaml:"extensions,omitempty"`
	PreReleaseHooks []map[string]PreReleaseHookConfig `yaml:"pre-release-hooks,omitempty"`
	Workspace       *WorkspaceConfig                  `yaml:"workspace,omitempty"`
}

Config is the main configuration structure for sley.

func (*Config) GetDiscoveryConfig

func (c *Config) GetDiscoveryConfig() *DiscoveryConfig

GetDiscoveryConfig returns the discovery configuration with defaults applied. If workspace or discovery is not configured, returns default discovery settings.

func (*Config) GetExcludePatterns

func (c *Config) GetExcludePatterns() []string

GetExcludePatterns returns the merged list of default and configured exclude patterns. Configured patterns are appended to defaults, allowing for extension.

func (*Config) HasExplicitModules

func (c *Config) HasExplicitModules() bool

HasExplicitModules returns true if modules are explicitly defined in the workspace configuration.

func (*Config) IsModuleEnabled

func (c *Config) IsModuleEnabled(name string) bool

IsModuleEnabled checks if a specific module is enabled by name. Returns false if the module is not found or workspace is not configured.

type ConfigSaver

type ConfigSaver struct {
	// contains filtered or unexported fields
}

ConfigSaver handles configuration saving with injected dependencies.

func NewConfigSaver

func NewConfigSaver(marshaler core.Marshaler, opener FileOpener, writer FileWriter) *ConfigSaver

NewConfigSaver creates a ConfigSaver with the given dependencies. If any dependency is nil, the production default is used.

func (*ConfigSaver) Save

func (s *ConfigSaver) Save(cfg *Config) error

Save saves the configuration to the default config file.

func (*ConfigSaver) SaveTo

func (s *ConfigSaver) SaveTo(cfg *Config, configFile string) error

SaveTo saves the configuration to the specified file path.

type ContributorsConfig

type ContributorsConfig struct {
	// Enabled controls whether to include contributors section.
	Enabled bool `yaml:"enabled,omitempty"`

	// Format is a Go template for contributor formatting.
	Format string `yaml:"format,omitempty"`

	// Icon is the icon/emoji for the contributors section header (optional).
	Icon string `yaml:"icon,omitempty"`

	// ShowNewContributors enables the "New Contributors" section showing first-time contributors.
	// Default: true when contributors are enabled.
	ShowNewContributors *bool `yaml:"show-new-contributors,omitempty"`

	// NewContributorsFormat is a Go template for new contributor entries.
	// Available fields: {{.Name}}, {{.Username}}, {{.Host}}, {{.PRNumber}}, {{.CommitHash}}
	// Default: "* [@{{.Username}}](https://{{.Host}}/{{.Username}}) made their first contribution in [#{{.PRNumber}}](...)"
	NewContributorsFormat string `yaml:"new-contributors-format,omitempty"`

	// NewContributorsIcon is the icon for the "New Contributors" section header.
	NewContributorsIcon string `yaml:"new-contributors-icon,omitempty"`
}

ContributorsConfig configures the contributors section in changelog.

func (*ContributorsConfig) GetShowNewContributors

func (c *ContributorsConfig) GetShowNewContributors() bool

GetShowNewContributors returns the show-new-contributors setting with default true.

type DependencyCheckConfig

type DependencyCheckConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// AutoSync automatically syncs versions after bumps.
	AutoSync bool `yaml:"auto-sync,omitempty"`

	// Files lists the files to check and sync.
	Files []DependencyFileConfig `yaml:"files,omitempty"`
}

DependencyCheckConfig holds configuration for the dependency check plugin.

type DependencyFileConfig

type DependencyFileConfig struct {
	// Path is the file path relative to repository root.
	Path string `yaml:"path"`

	// Field is the dot-notation path to the version field (for JSON/YAML/TOML).
	Field string `yaml:"field,omitempty"`

	// Format specifies the file format: json, yaml, toml, raw, regex
	Format string `yaml:"format"`

	// Pattern is the regex pattern for "regex" format.
	Pattern string `yaml:"pattern,omitempty"`
}

DependencyFileConfig defines a single file to check/sync.

type DiscoveryConfig

type DiscoveryConfig struct {
	// Enabled controls whether auto-discovery is active (default: true).
	Enabled *bool `yaml:"enabled,omitempty"`

	// Recursive enables searching subdirectories (default: true).
	Recursive *bool `yaml:"recursive,omitempty"`

	// ModuleMaxDepth limits directory traversal depth for module discovery (default: 10).
	ModuleMaxDepth *int `yaml:"module_max_depth,omitempty"`

	// ManifestMaxDepth limits directory traversal depth for manifest discovery (default: 3).
	// This is separate from ModuleMaxDepth to allow different depths for modules vs manifests.
	ManifestMaxDepth *int `yaml:"manifest_max_depth,omitempty"`

	// Exclude lists paths/patterns to skip during discovery.
	Exclude []string `yaml:"exclude,omitempty"`
}

DiscoveryConfig configures automatic module discovery behavior.

func DiscoveryDefaults

func DiscoveryDefaults() *DiscoveryConfig

DiscoveryDefaults returns a DiscoveryConfig with default values.

type ExtensionConfig

type ExtensionConfig struct {
	Name    string         `yaml:"name"`
	Path    string         `yaml:"path"`
	Enabled bool           `yaml:"enabled"`
	Config  map[string]any `yaml:"config,omitempty"`
}

ExtensionConfig holds configuration for external extensions.

type FileOpener

type FileOpener interface {
	OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
}

FileOpener abstracts file opening operations for testability.

type FileWriter

type FileWriter interface {
	WriteFile(file *os.File, data []byte) (int, error)
}

FileWriter abstracts file writing operations for testability.

type ModuleConfig

type ModuleConfig struct {
	// Name is the module identifier.
	Name string `yaml:"name"`

	// Path is the path to the module's .version file.
	Path string `yaml:"path"`

	// Enabled controls whether this module is active (default: true).
	Enabled *bool `yaml:"enabled,omitempty"`
}

ModuleConfig defines an explicitly configured module.

func (*ModuleConfig) IsEnabled

func (m *ModuleConfig) IsEnabled() bool

IsEnabled returns true if the module is enabled. Modules are enabled by default if the Enabled field is nil.

type PluginConfig

type PluginConfig struct {
	CommitParser       bool                      `yaml:"commit-parser"`
	TagManager         *TagManagerConfig         `yaml:"tag-manager,omitempty"`
	VersionValidator   *VersionValidatorConfig   `yaml:"version-validator,omitempty"`
	DependencyCheck    *DependencyCheckConfig    `yaml:"dependency-check,omitempty"`
	ChangelogParser    *ChangelogParserConfig    `yaml:"changelog-parser,omitempty"`
	ChangelogGenerator *ChangelogGeneratorConfig `yaml:"changelog-generator,omitempty"`
	ReleaseGate        *ReleaseGateConfig        `yaml:"release-gate,omitempty"`
	AuditLog           *AuditLogConfig           `yaml:"audit-log,omitempty"`
}

PluginConfig holds configuration for all built-in plugins.

type PreReleaseHookConfig

type PreReleaseHookConfig struct {
	Command string `yaml:"command,omitempty"`
}

PreReleaseHookConfig holds configuration for pre-release hooks.

type ReleaseGateConfig

type ReleaseGateConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// RequireCleanWorktree blocks bumps if git has uncommitted changes.
	RequireCleanWorktree bool `yaml:"require-clean-worktree,omitempty"`

	// RequireCIPass checks CI status before allowing bumps (disabled by default).
	RequireCIPass bool `yaml:"require-ci-pass,omitempty"`

	// BlockedOnWIPCommits blocks if recent commits contain WIP/fixup/squash.
	BlockedOnWIPCommits bool `yaml:"blocked-on-wip-commits,omitempty"`

	// AllowedBranches lists branches where bumps are allowed (empty = all allowed).
	AllowedBranches []string `yaml:"allowed-branches,omitempty"`

	// BlockedBranches lists branches where bumps are never allowed.
	BlockedBranches []string `yaml:"blocked-branches,omitempty"`
}

ReleaseGateConfig holds configuration for the release gate plugin.

type RepositoryConfig

type RepositoryConfig struct {
	// Provider is the git hosting provider: github, gitlab, codeberg, gitea, bitbucket, custom.
	// Default: auto-detected from git remote URL.
	Provider string `yaml:"provider,omitempty"`

	// Host is the git server hostname (e.g., "github.com", "gitlab.com", "codeberg.org").
	// Required for custom providers or when auto-detect is disabled.
	Host string `yaml:"host,omitempty"`

	// Owner is the repository owner/organization.
	Owner string `yaml:"owner,omitempty"`

	// Repo is the repository name.
	Repo string `yaml:"repo,omitempty"`

	// AutoDetect enables automatic detection from git remote.
	AutoDetect bool `yaml:"auto-detect,omitempty"`
}

RepositoryConfig holds git repository settings for changelog links. Supports multiple providers: github, gitlab, codeberg, gitea, bitbucket, custom.

type TagManagerConfig

type TagManagerConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// AutoCreate automatically creates tags after version bumps.
	AutoCreate *bool `yaml:"auto-create,omitempty"`

	// Prefix is the tag prefix (default: "v").
	Prefix string `yaml:"prefix,omitempty"`

	// Annotate creates annotated tags instead of lightweight tags.
	Annotate *bool `yaml:"annotate,omitempty"`

	// Push automatically pushes tags to remote after creation.
	Push bool `yaml:"push,omitempty"`

	// TagPrereleases controls whether tags are created for pre-release versions.
	// When false, tags are only created for stable releases (major/minor/patch).
	// Default: false.
	TagPrereleases *bool `yaml:"tag-prereleases,omitempty"`

	// Sign creates GPG-signed tags using git tag -s.
	// Requires git to be configured with a GPG signing key.
	// Default: false.
	Sign bool `yaml:"sign,omitempty"`

	// SigningKey specifies the GPG key ID to use for signing.
	// If empty, git uses the default signing key from user.signingkey config.
	// Only used when Sign is true.
	SigningKey string `yaml:"signing-key,omitempty"`

	// MessageTemplate is a template for the tag message.
	// Supports placeholders: {version}, {tag}, {prefix}, {date}, {major}, {minor}, {patch}, {prerelease}, {build}
	// Default: "Release {version}" for annotated/signed tags.
	MessageTemplate string `yaml:"message-template,omitempty"`
}

TagManagerConfig holds configuration for the tag manager plugin.

func (*TagManagerConfig) GetAnnotate

func (c *TagManagerConfig) GetAnnotate() bool

GetAnnotate returns the annotate setting with default true.

func (*TagManagerConfig) GetAutoCreate

func (c *TagManagerConfig) GetAutoCreate() bool

GetAutoCreate returns the auto-create setting with default false.

func (*TagManagerConfig) GetMessageTemplate added in v0.7.0

func (c *TagManagerConfig) GetMessageTemplate() string

GetMessageTemplate returns the message template with default "Release {version}".

func (*TagManagerConfig) GetPrefix

func (c *TagManagerConfig) GetPrefix() string

GetPrefix returns the prefix with default "v".

func (*TagManagerConfig) GetSign added in v0.7.0

func (c *TagManagerConfig) GetSign() bool

GetSign returns the sign setting.

func (*TagManagerConfig) GetSigningKey added in v0.7.0

func (c *TagManagerConfig) GetSigningKey() string

GetSigningKey returns the signing key.

func (*TagManagerConfig) GetTagPrereleases added in v0.7.0

func (c *TagManagerConfig) GetTagPrereleases() bool

GetTagPrereleases returns the tag-prereleases setting with default false.

type ValidationResult

type ValidationResult struct {
	// Category is the validation category (e.g., "YAML Syntax", "Plugin Config").
	Category string

	// Passed indicates if the check passed.
	Passed bool

	// Message provides details about the validation result.
	Message string

	// Warning indicates if this is a warning rather than an error.
	Warning bool
}

ValidationResult represents the result of a validation check.

type ValidationRule

type ValidationRule struct {
	// Type is the rule type (e.g., "pre-release-format", "major-version-max").
	Type string `yaml:"type"`

	// Pattern is a regex pattern for format validation rules.
	Pattern string `yaml:"pattern,omitempty"`

	// Value is a numeric limit for max-version rules.
	Value int `yaml:"value,omitempty"`

	// Enabled controls whether this specific rule is active.
	Enabled bool `yaml:"enabled,omitempty"`

	// Branch is a glob pattern for branch-constraint rules.
	Branch string `yaml:"branch,omitempty"`

	// Allowed lists allowed bump types for branch-constraint rules.
	Allowed []string `yaml:"allowed,omitempty"`
}

ValidationRule defines a single validation rule.

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator validates configuration files and settings.

func NewValidator

func NewValidator(fs core.FileSystem, cfg *Config, configPath string, rootDir string) *Validator

NewValidator creates a new configuration validator. The rootDir parameter is the directory where .sley.yaml is located.

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context) ([]ValidationResult, error)

Validate runs all validation checks and returns the results.

type VersionValidatorConfig

type VersionValidatorConfig struct {
	// Enabled controls whether the plugin is active.
	Enabled bool `yaml:"enabled"`

	// Rules defines the validation rules to apply.
	Rules []ValidationRule `yaml:"rules,omitempty"`
}

VersionValidatorConfig holds configuration for the version validator plugin.

type WorkspaceConfig

type WorkspaceConfig struct {
	// Discovery configures automatic module discovery.
	Discovery *DiscoveryConfig `yaml:"discovery,omitempty"`

	// Modules explicitly defines modules (overrides discovery if non-empty).
	Modules []ModuleConfig `yaml:"modules,omitempty"`
}

WorkspaceConfig configures multi-module/monorepo behavior.

Jump to

Keyboard shortcuts

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