config

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFile string

Functions

This section is empty.

Types

type Config

type Config struct {
	Scanner ScannerConfig `mapstructure:"scanner"`
	Rules   RulesConfig   `mapstructure:"rules"`
	Output  OutputConfig  `mapstructure:"output"`
	Patch   PatchConfig   `mapstructure:"patch"`
}

Config holds the application configuration

func Load

func Load() *Config

Load loads configuration from file and environment variables

type OutputConfig

type OutputConfig struct {
	DefaultFormat string `mapstructure:"default_format"`
	IncludeSource bool   `mapstructure:"include_source"`
	Verbose       bool   `mapstructure:"verbose"`
}

OutputConfig holds output configuration

type PatchConfig

type PatchConfig struct {
	TemplatesPath string            `mapstructure:"templates_path"`
	DefaultEngine string            `mapstructure:"default_engine"`
	Variables     map[string]string `mapstructure:"variables"`
}

PatchConfig holds patch generation configuration

type RulesConfig

type RulesConfig struct {
	DefaultRulesPath string   `mapstructure:"default_rules_path"`
	CustomRulesPaths []string `mapstructure:"custom_rules_paths"`
	EnabledRules     []string `mapstructure:"enabled_rules"`
	DisabledRules    []string `mapstructure:"disabled_rules"`
}

RulesConfig holds rules configuration

type ScannerConfig

type ScannerConfig struct {
	MaxFileSize    int64    `mapstructure:"max_file_size"`
	IgnorePatterns []string `mapstructure:"ignore_patterns"`
	Languages      []string `mapstructure:"languages"`
	Parallel       int      `mapstructure:"parallel"`
	EnableAST      bool     `mapstructure:"enable_ast"`
	EnableDataFlow bool     `mapstructure:"enable_dataflow"`
	Offline        bool     `mapstructure:"offline"`
}

ScannerConfig holds scanner-specific configuration

Jump to

Keyboard shortcuts

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