config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPaths

func GetConfigPaths() []string

GetConfigPaths returns standard configuration file paths

func Save

func Save(config *Config, configPath string) error

Save saves configuration to a file

Types

type Config

type Config struct {
	Scan       ScanConfig    `yaml:"scan"`
	Thresholds Thresholds    `yaml:"thresholds"`
	Output     OutputConfig  `yaml:"output"`
	Logging    LoggingConfig `yaml:"logging"`
}

Config represents the application configuration

func GetDefaultConfig

func GetDefaultConfig() *Config

GetDefaultConfig returns the default configuration

func Load

func Load(configPath string) (*Config, error)

Load loads configuration from a file

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

type HTMLConfig

type HTMLConfig struct {
	Path            string `yaml:"path"`
	AutoRefresh     bool   `yaml:"auto_refresh"`
	RefreshInterval int    `yaml:"refresh_interval"`
	Theme           string `yaml:"theme"`
}

HTMLConfig contains HTML report settings

type LoggingConfig

type LoggingConfig struct {
	Level  string `yaml:"level"`
	Format string `yaml:"format"`
}

LoggingConfig contains logging settings

type MarkdownConfig

type MarkdownConfig struct {
	Enabled         bool   `yaml:"enabled"`
	Path            string `yaml:"path"`
	IncludeExamples bool   `yaml:"include_examples"`
}

MarkdownConfig contains markdown report settings

type OutputConfig

type OutputConfig struct {
	HTML     HTMLConfig     `yaml:"html"`
	Markdown MarkdownConfig `yaml:"markdown"`
}

OutputConfig contains output-related settings

type ScanConfig

type ScanConfig struct {
	Paths     []string `yaml:"paths"`
	Exclude   []string `yaml:"exclude"`
	FileTypes []string `yaml:"file_types"`
}

ScanConfig contains scanning-related settings

type Thresholds

type Thresholds struct {
	FunctionLines        int `yaml:"function_lines"`
	CyclomaticComplexity int `yaml:"cyclomatic_complexity"`
	Parameters           int `yaml:"parameters"`
	NestingDepth         int `yaml:"nesting_depth"`
	ClassLines           int `yaml:"class_lines"`
}

Thresholds contains clean code thresholds

Jump to

Keyboard shortcuts

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