Documentation
¶
Index ¶
- func FindConfigFile() string
- func SaveConfig(config *Config, configPath string) error
- type Config
- func (c *Config) GetLanguageConfig(language string) LanguageConfig
- func (c *Config) GetPreferredTools(language string) []string
- func (c *Config) GetToolConfig(toolName string) ToolConfig
- func (c *Config) IsLanguageEnabled(language string) bool
- func (c *Config) IsToolEnabled(toolName string) bool
- func (c *Config) ShouldExclude(filePath string) bool
- func (c *Config) ShouldInclude(filePath string) bool
- type LanguageConfig
- type ToolConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindConfigFile ¶
func FindConfigFile() string
FindConfigFile searches for a quality config file in the current directory and up the directory tree.
func SaveConfig ¶
SaveConfig saves configuration to file.
Types ¶
type Config ¶
type Config struct {
// DefaultWorkers sets the default number of parallel workers
DefaultWorkers int `yaml:"default_workers"`
// Timeout sets the default timeout for tool execution
Timeout string `yaml:"timeout"`
// Tools contains tool-specific configurations
Tools map[string]ToolConfig `yaml:"tools"`
// Languages contains language-specific configurations
Languages map[string]LanguageConfig `yaml:"languages"`
// Exclude contains patterns to exclude from processing
Exclude []string `yaml:"exclude"`
// Include contains patterns to include in processing
Include []string `yaml:"include"`
}
Config represents the quality command configuration.
func LoadConfig ¶
LoadConfig loads configuration from file.
func (*Config) GetLanguageConfig ¶
func (c *Config) GetLanguageConfig(language string) LanguageConfig
GetLanguageConfig returns configuration for a specific language.
func (*Config) GetPreferredTools ¶
GetPreferredTools returns preferred tools for a language.
func (*Config) GetToolConfig ¶
func (c *Config) GetToolConfig(toolName string) ToolConfig
GetToolConfig returns configuration for a specific tool.
func (*Config) IsLanguageEnabled ¶
IsLanguageEnabled checks if a language is enabled.
func (*Config) IsToolEnabled ¶
IsToolEnabled checks if a tool is enabled.
func (*Config) ShouldExclude ¶
ShouldExclude checks if a file path should be excluded.
func (*Config) ShouldInclude ¶
ShouldInclude checks if a file path should be included.
type LanguageConfig ¶
type LanguageConfig struct {
// Enabled controls whether to process this language
Enabled bool `yaml:"enabled"`
// PreferredTools lists preferred tools for this language
PreferredTools []string `yaml:"preferred_tools"`
// Extensions lists file extensions for this language
Extensions []string `yaml:"extensions"`
}
LanguageConfig represents configuration for a language.
type ToolConfig ¶
type ToolConfig struct {
// Enabled controls whether the tool should be used
Enabled bool `yaml:"enabled"`
// ConfigFile specifies a custom config file path
ConfigFile string `yaml:"config_file"`
// Args contains additional arguments to pass to the tool
Args []string `yaml:"args"`
// Env contains environment variables for the tool
Env map[string]string `yaml:"env"`
// Priority affects execution order (higher = earlier)
Priority int `yaml:"priority"`
}
ToolConfig represents configuration for a specific tool.