1515from vallm .core .proposal import Proposal
1616
1717console = Console ()
18+ OUTPUT_FORMAT_HELP = "Output format"
1819
1920
2021def validate_command (
@@ -25,8 +26,9 @@ def validate_command(
2526 config : Optional [Path ] = typer .Option (None , "--config" , help = "Path to vallm.toml" ),
2627 enable_semantic : bool = typer .Option (False , "--semantic" , help = "Enable LLM-as-judge" ),
2728 enable_security : bool = typer .Option (False , "--security" , help = "Enable security checks" ),
29+ enable_regression : bool = typer .Option (False , "--regression" , help = "Enable regression tests" ),
2830 model : Optional [str ] = typer .Option (None , "--model" , "-m" , help = "LLM model for semantic" ),
29- output_format : str = typer .Option ("rich" , "--output" , "-o" , help = "Output format" ),
31+ output_format : str = typer .Option ("rich" , "--output" , "-o" , help = OUTPUT_FORMAT_HELP ),
3032 verbose : bool = typer .Option (False , "--verbose" , "-v" , help = "Show detailed results" ),
3133 exit_on_verdict : bool = typer .Option (False , "--exit" , help = "Exit with non-zero on fail/review" ),
3234) -> None :
@@ -41,7 +43,14 @@ def validate_command(
4143 detected_language = _detect_and_log_language (file , language )
4244
4345 # Build settings
44- settings = build_validate_settings (config , enable_semantic , enable_security , model , verbose )
46+ settings = build_validate_settings (
47+ config ,
48+ enable_semantic ,
49+ enable_security ,
50+ enable_regression ,
51+ model ,
52+ verbose ,
53+ )
4554
4655 # Create proposal
4756 proposal = _build_proposal (code_str , detected_language , ref_code , file )
@@ -79,7 +88,7 @@ def check_command(
7988 from vallm .scoring import validate
8089
8190 # Only enable syntax validator
82- settings = build_validate_settings (None , False , False , None , False )
91+ settings = build_validate_settings (None , False , False , False , None , False )
8392 settings .enable_syntax = True
8493 settings .enable_imports = False
8594 settings .enable_complexity = False
@@ -100,10 +109,11 @@ def batch_command(
100109 use_gitignore : bool = typer .Option (True , "--gitignore/--no-gitignore" , help = "Respect .gitignore" ),
101110 enable_semantic : bool = typer .Option (False , "--semantic" , help = "Enable LLM-as-judge" ),
102111 enable_security : bool = typer .Option (False , "--security" , help = "Enable security checks" ),
112+ enable_regression : bool = typer .Option (False , "--regression" , help = "Enable regression tests" ),
103113 no_imports : bool = typer .Option (False , "--no-imports" , help = "Skip import validation (faster)" ),
104114 no_complexity : bool = typer .Option (False , "--no-complexity" , help = "Skip complexity analysis (faster)" ),
105115 model : Optional [str ] = typer .Option (None , "--model" , "-m" , help = "LLM model for semantic" ),
106- format : str = typer .Option ("rich" , "--format" , "-f" , help = "Output format" ),
116+ format : str = typer .Option ("rich" , "--format" , "-f" , help = OUTPUT_FORMAT_HELP ),
107117 output : Optional [Path ] = typer .Option (None , "--output" , "-o" , help = "Output directory" ),
108118 fail_fast : bool = typer .Option (False , "--fail-fast" , help = "Stop on first failure" ),
109119 verbose : bool = typer .Option (False , "--verbose" , "-v" , help = "Show detailed validation results for each file" ),
@@ -113,7 +123,15 @@ def batch_command(
113123 from vallm .cli .batch_processor import BatchProcessor
114124 processor = BatchProcessor (console )
115125
116- settings = build_batch_settings (enable_semantic , enable_security , model , verbose , no_imports , no_complexity )
126+ settings = build_batch_settings (
127+ enable_semantic ,
128+ enable_security ,
129+ enable_regression ,
130+ model ,
131+ verbose ,
132+ no_imports ,
133+ no_complexity ,
134+ )
117135
118136 results_by_language , failed_files , passed_count , filtered_files = processor .process_batch (
119137 paths = paths ,
@@ -309,13 +327,14 @@ def _show_general_info() -> None:
309327 console .print (" 2. Import validation - Module resolution checking" )
310328 console .print (" 3. Complexity analysis - Cyclomatic complexity metrics" )
311329 console .print (" 4. Security analysis - Security pattern detection" )
312- console .print (" 5. Semantic analysis - LLM-powered code review" )
330+ console .print (" 5. Regression testing - Pytest-based regression checks" )
331+ console .print (" 6. Semantic analysis - LLM-powered code review" )
313332
314333 # Show cache stats
315334 cache_stats = get_semantic_cache ().get_cache_stats ()
316- console .print (f "\n [bold]Semantic Cache:[/bold]" )
335+ console .print ("\n [bold]Semantic Cache:[/bold]" )
317336 console .print (f" Cached entries: { cache_stats ['total_entries' ]} " )
318- console .print (f " Use 'vallm info --clear-cache' to clear cache" )
337+ console .print (" Use 'vallm info --clear-cache' to clear cache" )
319338
320339 console .print ("\n [bold]Import Validation Languages:[/bold]" )
321340 factory = ImportValidatorFactory ()
0 commit comments