config

package
v1.0.9 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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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