config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ignore     []string     `json:"ignore,omitempty"`
	MaxDepth   int          `json:"max_depth,omitempty"`
	MaxModules int          `json:"max_modules,omitempty"`
	MaxExports int          `json:"max_exports,omitempty"`
	Output     OutputConfig `json:"output,omitempty"`
}

Config holds the settings loaded from a .stacklitrc.json file.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a Config populated with sensible defaults.

func Load

func Load(root string) *Config

Load reads .stacklitrc.json from root and merges it over the defaults. If the file does not exist or cannot be parsed, defaults are returned.

func (*Config) ScanIgnore added in v0.3.2

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

ScanIgnore returns ignore patterns plus Stacklit output files so generated artifacts never feed back into the next scan. All patterns are normalized to forward slashes so they match the walker's normalized paths on every OS.

type OutputConfig

type OutputConfig struct {
	JSON    string `json:"json,omitempty"`
	Mermaid string `json:"mermaid,omitempty"`
	HTML    string `json:"html,omitempty"`
}

OutputConfig controls where output files are written.

Jump to

Keyboard shortcuts

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