-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquality-gate.toml
More file actions
103 lines (91 loc) · 2.17 KB
/
quality-gate.toml
File metadata and controls
103 lines (91 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# SDP Quality Gate Configuration
# Version: 1.0.0
# This file defines quality thresholds for code validation
[workstreams]
# Workstream directory (relative to project root)
# Override with SDP_WORKSTREAM_DIR environment variable
dir = "docs/workstreams"
[coverage]
# Test coverage requirements
enabled = true
minimum = 80
fail_under = 80
exclude_patterns = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/migrations/*"
]
[complexity]
# Cyclomatic complexity limits
enabled = true
max_cc = 10
max_average_cc = 5
[file_size]
# File size limits (lines of code)
enabled = true
max_lines = 200
max_imports = 20
max_functions = 15
[type_hints]
# Type hinting requirements
enabled = true
require_return_types = true
require_param_types = true
strict_mode = true
allow_implicit_any = false
[error_handling]
# Error handling patterns
enabled = true
forbid_bare_except = true
forbid_bare_raise = true
forbid_pass_with_except = true
require_explicit_errors = true
[architecture]
# Clean architecture boundaries
enabled = true
enforce_layer_separation = true
forbid_violations = [
# Clean architecture: inner layers cannot import from outer layers
"domain -> application",
"domain -> infrastructure",
"domain -> presentation",
"application -> infrastructure",
"application -> presentation",
"infrastructure -> presentation"
]
[documentation]
# Documentation requirements
enabled = true
require_docstrings = false
min_docstring_coverage = 0.5
require_module_docstrings = true
require_class_docstrings = false
require_function_docstrings = false
[testing]
# Test quality requirements
enabled = true
require_test_for_new_code = true
min_test_to_code_ratio = 0.8
require_fast_marker = true
forbid_print_statements = true
[naming]
# Naming conventions
enabled = true
enforce_pep8 = true
allow_single_letter = false
min_variable_name_length = 3
max_variable_name_length = 50
[security]
# Security checks
enabled = true
forbid_hardcoded_secrets = true
forbid_sql_injection_patterns = true
forbid_eval_usage = true
require_https_urls = true
[performance]
# Performance checks
enabled = true
forbid_sql_queries_in_loops = true
max_nesting_depth = 5
warn_large_string_concatenation = true