chore: fix toml lint
This commit is contained in:
parent
3c88c8ddd4
commit
93625d6290
@ -3,11 +3,11 @@
|
||||
|
||||
[validation_settings]
|
||||
# Global validation settings
|
||||
default_severity_filter = "warning"
|
||||
auto_fix_enabled = true
|
||||
default_report_format = "md"
|
||||
default_severity_filter = "warning"
|
||||
max_concurrent_rules = 4
|
||||
progress_reporting = true
|
||||
auto_fix_enabled = true
|
||||
|
||||
# Rule execution settings
|
||||
[execution]
|
||||
@ -18,126 +18,126 @@ rule_groups = [
|
||||
"schema", # Schema validation
|
||||
"security", # Security checks
|
||||
"best_practices", # Best practices
|
||||
"compatibility" # Compatibility checks
|
||||
"compatibility", # Compatibility checks
|
||||
]
|
||||
|
||||
# Timeout settings (in seconds)
|
||||
rule_timeout = 30
|
||||
file_timeout = 10
|
||||
rule_timeout = 30
|
||||
total_timeout = 300
|
||||
|
||||
# Parallel processing
|
||||
parallel_files = true
|
||||
max_file_workers = 8
|
||||
parallel_files = true
|
||||
|
||||
# Core validation rules
|
||||
[[rules]]
|
||||
auto_fix = true
|
||||
category = "syntax"
|
||||
description = "Validate YAML files have correct syntax and can be parsed"
|
||||
enabled = true
|
||||
execution_order = 1
|
||||
files_pattern = '.*\.ya?ml$'
|
||||
fix_function = "fix_yaml_syntax"
|
||||
id = "VAL001"
|
||||
name = "YAML Syntax Validation"
|
||||
description = "Validate YAML files have correct syntax and can be parsed"
|
||||
category = "syntax"
|
||||
severity = "critical"
|
||||
enabled = true
|
||||
auto_fix = true
|
||||
files_pattern = '.*\.ya?ml$'
|
||||
validator_function = "validate_yaml_syntax"
|
||||
fix_function = "fix_yaml_syntax"
|
||||
execution_order = 1
|
||||
tags = ["syntax", "yaml", "critical"]
|
||||
validator_function = "validate_yaml_syntax"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = false
|
||||
category = "compilation"
|
||||
dependencies = ["kcl"] # Required system dependencies
|
||||
description = "Validate KCL files compile successfully"
|
||||
enabled = true
|
||||
execution_order = 2
|
||||
files_pattern = '.*\.k$'
|
||||
id = "VAL002"
|
||||
name = "KCL Compilation Check"
|
||||
description = "Validate KCL files compile successfully"
|
||||
category = "compilation"
|
||||
severity = "critical"
|
||||
enabled = true
|
||||
auto_fix = false
|
||||
files_pattern = '.*\.k$'
|
||||
validator_function = "validate_kcl_compilation"
|
||||
execution_order = 2
|
||||
tags = ["kcl", "compilation", "critical"]
|
||||
dependencies = ["kcl"] # Required system dependencies
|
||||
validator_function = "validate_kcl_compilation"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = true
|
||||
category = "syntax"
|
||||
description = "Check for unquoted variable references in YAML that cause parsing errors"
|
||||
enabled = true
|
||||
execution_order = 3
|
||||
files_pattern = '.*\.ya?ml$'
|
||||
fix_function = "fix_unquoted_variables"
|
||||
id = "VAL003"
|
||||
name = "Unquoted Variable References"
|
||||
description = "Check for unquoted variable references in YAML that cause parsing errors"
|
||||
category = "syntax"
|
||||
severity = "error"
|
||||
enabled = true
|
||||
auto_fix = true
|
||||
files_pattern = '.*\.ya?ml$'
|
||||
validator_function = "validate_quoted_variables"
|
||||
fix_function = "fix_unquoted_variables"
|
||||
execution_order = 3
|
||||
tags = ["yaml", "variables", "syntax"]
|
||||
validator_function = "validate_quoted_variables"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = false
|
||||
category = "schema"
|
||||
description = "Validate that all required fields are present in configuration files"
|
||||
enabled = true
|
||||
execution_order = 10
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
id = "VAL004"
|
||||
name = "Required Fields Validation"
|
||||
description = "Validate that all required fields are present in configuration files"
|
||||
category = "schema"
|
||||
severity = "error"
|
||||
enabled = true
|
||||
auto_fix = false
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
validator_function = "validate_required_fields"
|
||||
execution_order = 10
|
||||
tags = ["schema", "required", "fields"]
|
||||
validator_function = "validate_required_fields"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = true
|
||||
category = "best_practices"
|
||||
description = "Validate resource names follow established conventions"
|
||||
enabled = true
|
||||
execution_order = 20
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
fix_function = "fix_naming_conventions"
|
||||
id = "VAL005"
|
||||
name = "Resource Naming Conventions"
|
||||
description = "Validate resource names follow established conventions"
|
||||
category = "best_practices"
|
||||
severity = "warning"
|
||||
enabled = true
|
||||
auto_fix = true
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
validator_function = "validate_naming_conventions"
|
||||
fix_function = "fix_naming_conventions"
|
||||
execution_order = 20
|
||||
tags = ["naming", "conventions", "best_practices"]
|
||||
validator_function = "validate_naming_conventions"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = false
|
||||
category = "security"
|
||||
description = "Validate basic security configurations like SSH keys, exposed ports"
|
||||
enabled = true
|
||||
execution_order = 15
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
id = "VAL006"
|
||||
name = "Basic Security Checks"
|
||||
description = "Validate basic security configurations like SSH keys, exposed ports"
|
||||
category = "security"
|
||||
severity = "error"
|
||||
enabled = true
|
||||
auto_fix = false
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
validator_function = "validate_security_basics"
|
||||
execution_order = 15
|
||||
tags = ["security", "ssh", "ports"]
|
||||
validator_function = "validate_security_basics"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = false
|
||||
category = "compatibility"
|
||||
description = "Check for deprecated versions and compatibility issues"
|
||||
enabled = true
|
||||
execution_order = 25
|
||||
files_pattern = '.*\.(k|ya?ml|toml)$'
|
||||
id = "VAL007"
|
||||
name = "Version Compatibility Check"
|
||||
description = "Check for deprecated versions and compatibility issues"
|
||||
category = "compatibility"
|
||||
severity = "warning"
|
||||
enabled = true
|
||||
auto_fix = false
|
||||
files_pattern = '.*\.(k|ya?ml|toml)$'
|
||||
validator_function = "validate_version_compatibility"
|
||||
execution_order = 25
|
||||
tags = ["versions", "compatibility", "deprecation"]
|
||||
validator_function = "validate_version_compatibility"
|
||||
|
||||
[[rules]]
|
||||
auto_fix = false
|
||||
category = "networking"
|
||||
description = "Validate network configurations, CIDR blocks, and IP assignments"
|
||||
enabled = true
|
||||
execution_order = 18
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
id = "VAL008"
|
||||
name = "Network Configuration Validation"
|
||||
description = "Validate network configurations, CIDR blocks, and IP assignments"
|
||||
category = "networking"
|
||||
severity = "error"
|
||||
enabled = true
|
||||
auto_fix = false
|
||||
files_pattern = '.*\.(k|ya?ml)$'
|
||||
validator_function = "validate_network_config"
|
||||
execution_order = 18
|
||||
tags = ["networking", "cidr", "ip"]
|
||||
validator_function = "validate_network_config"
|
||||
|
||||
# Extension points for custom rules
|
||||
[extensions]
|
||||
@ -146,15 +146,11 @@ rule_paths = [
|
||||
"./custom_rules",
|
||||
"./providers/*/validation_rules",
|
||||
"./taskservs/*/validation_rules",
|
||||
"../validation_extensions"
|
||||
"../validation_extensions",
|
||||
]
|
||||
|
||||
# Custom rule file patterns
|
||||
rule_file_patterns = [
|
||||
"*_validation_rules.toml",
|
||||
"validation_*.toml",
|
||||
"rules.toml"
|
||||
]
|
||||
rule_file_patterns = ["*_validation_rules.toml", "validation_*.toml", "rules.toml"]
|
||||
|
||||
# Hook system for extending validation
|
||||
[hooks]
|
||||
@ -165,12 +161,12 @@ pre_validation = []
|
||||
post_validation = []
|
||||
|
||||
# Per-rule hooks
|
||||
pre_rule = []
|
||||
post_rule = []
|
||||
pre_rule = []
|
||||
|
||||
# Report generation hooks
|
||||
pre_report = []
|
||||
post_report = []
|
||||
pre_report = []
|
||||
|
||||
# CI/CD integration settings
|
||||
[ci_cd]
|
||||
@ -195,27 +191,27 @@ max_total_size = 100
|
||||
max_memory_usage = "512MB"
|
||||
|
||||
# Caching settings
|
||||
enable_caching = true
|
||||
cache_duration = 3600 # seconds
|
||||
enable_caching = true
|
||||
|
||||
# Provider-specific rule configurations
|
||||
[providers.upcloud]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL006", "VAL008"]
|
||||
custom_rules = ["UPCLOUD001", "UPCLOUD002"]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL006", "VAL008"]
|
||||
|
||||
[providers.aws]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL006", "VAL007", "VAL008"]
|
||||
custom_rules = ["AWS001", "AWS002", "AWS003"]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL006", "VAL007", "VAL008"]
|
||||
|
||||
[providers.local]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL005"]
|
||||
custom_rules = []
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL003", "VAL004", "VAL005"]
|
||||
|
||||
# Taskserv-specific configurations
|
||||
[taskservs.kubernetes]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL004", "VAL006", "VAL008"]
|
||||
custom_rules = ["K8S001", "K8S002"]
|
||||
enabled_rules = ["VAL001", "VAL002", "VAL004", "VAL006", "VAL008"]
|
||||
|
||||
[taskservs.containerd]
|
||||
enabled_rules = ["VAL001", "VAL004", "VAL006"]
|
||||
custom_rules = ["CONTAINERD001"]
|
||||
enabled_rules = ["VAL001", "VAL004", "VAL006"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user