11<!-- code2docs:start --> # vallm
22
3- ![ version] ( https://img.shields.io/badge/version-0.1.0-blue ) ![ python] ( https://img.shields.io/badge/python-%3E%3D3.10-blue ) ![ coverage] ( https://img.shields.io/badge/coverage-unknown-lightgrey ) ![ functions] ( https://img.shields.io/badge/functions-329 -green )
4- > ** 329 ** functions | ** 41 ** classes | ** 82** files | CCΜ = 3.6
3+ ![ version] ( https://img.shields.io/badge/version-0.1.0-blue ) ![ python] ( https://img.shields.io/badge/python-%3E%3D3.10-blue ) ![ coverage] ( https://img.shields.io/badge/coverage-unknown-lightgrey ) ![ functions] ( https://img.shields.io/badge/functions-322 -green )
4+ > ** 322 ** functions | ** 40 ** classes | ** 82** files | CCΜ = 3.4
55
66> Auto-generated project documentation from source code analysis.
77
@@ -151,7 +151,7 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
151151
152152```
153153vallm/
154- βββ bump_version βββ hookspecs βββ vallm/ βββ __main__ βββ cli/ βββ base βββ complexity βββ logical βββ validators/ βββ semantic_cache βββ security βββ syntax βββ lint βββ imports/ βββ semantic βββ graph_diff βββ core/ βββ ast_compare βββ proposal βββ gitignore βββ scoring βββ output_formatters βββ languages βββ batch_processor βββ runner βββ sandbox/ βββ base βββ javascript_imports βββ python_imports βββ go_imports βββ c_imports βββ rust_imports βββ utils βββ wrapper βββ factory βββ java_imports βββ main_template βββ main βββ main βββ claude_autonomous_demo βββ main βββ ollama_simple_demo βββ iteration_1 βββ best_version βββ iteration_2 βββ main βββ main βββ main βββ main_template βββ main βββ main βββ refactored_output βββ optimized_batch_processor βββ utils/ βββ extraction βββ save_analysis_data βββ extract_code_from_response βββ validation_runner βββ mcp_demo βββ logging_utils βββ order_processor βββ main βββ process_user_input βββ simple_buggy βββ utils/ βββ load_config βββ main βββ calculate_total βββ save_dataβββ project βββ run βββ run βββ docker-entrypoint βββ run βββ docker-entrypoint βββ run βββ docker-entrypoint βββ data_processor βββ config βββ command_handlers```
154+ βββ examples/ βββ cli/ βββ hookspecs βββ vallm/ βββ __main__ βββ bump_version βββ base βββ complexity βββ logical βββ validators/ βββ semantic_cache βββ security βββ syntax βββ lint βββ imports/ βββ semantic βββ graph_diff βββ core/ βββ ast_compare βββ proposal βββ gitignore βββ scoring βββ output_formatters βββ batch_processor βββ languages βββ sandbox/ βββ base βββ javascript_imports βββ python_imports βββ go_imports βββ c_imports βββ rust_imports βββ utils βββ wrapper βββ factory βββ java_imports βββ main_template βββ main βββ main βββ claude_autonomous_demo βββ main βββ ollama_simple_demo βββ iteration_1 βββ best_version βββ iteration_2 βββ main βββ main βββ main βββ main_template βββ main βββ main βββ refactored_output βββ runner βββ utils/ βββ mcp_demo βββ extraction βββ save_analysis_data βββ extract_code_from_response βββ logging_utils βββ validation_runner βββ order_processor βββ main βββ process_user_input βββ load_config βββ simple_buggy βββ utils/ βββ calculate_total βββ main βββ save_dataβββ project βββ run βββ run βββ docker-entrypoint βββ run βββ docker-entrypoint βββ run βββ docker-entrypoint βββ data_processor βββ config βββ command_handlers```
155155
156156## API Overview
157157
@@ -174,10 +174,8 @@ vallm/
174174- **`Issue`** β A single issue found during validation.
175175- **`ValidationResult`** β Result from a single validator.
176176- **`PipelineResult`** β Aggregated result from all validators.
177- - **`Language`** β Supported programming languages with their tree-sitter identifiers.
178177- **`BatchProcessor`** β Handles batch validation of multiple files.
179- - **`ExecutionResult`** β Result of sandboxed code execution.
180- - **`SandboxRunner`** β Unified interface for running code in a sandbox.
178+ - **`Language`** β Supported programming languages with their tree-sitter identifiers.
181179- **`BaseImportValidator`** β Base class for all import validators.
182180- **`JavaScriptImportValidator`** β JavaScript/TypeScript import validator.
183181- **`PythonImportValidator`** β Python-specific import validator.
@@ -190,7 +188,8 @@ vallm/
190188- **`Colors`** β β
191189- **`Colors`** β β
192190- **`OrderManager`** β Class with single responsibility - adheres to SOLID principles.
193- - **`OptimizedBatchProcessor`** β Optimized batch processor with parallel processing capabilities.
191+ - **`ExecutionResult`** β Result of sandboxed code execution.
192+ - **`SandboxRunner`** β Unified interface for running code in a sandbox.
194193- **`Colors`** β β
195194- **`Colors`** β ANSI color codes for terminal output.
196195- **`OrderManager`** β Class with mixed responsibilities - SOLID violation.
@@ -298,16 +297,10 @@ vallm/
298297- `save_data(data, filename)` β Save data safely using json.dump.
299298- `process_order(data)` β Process order data with proper error handling and validation.
300299- `main()` β β
301- - `create_optimized_batch_processor(console)` β Create an optimized batch processor instance.
302300- `save_analysis_data(example_name, result_data)` β Save analysis data to .vallm folder.
303301- `run_validation_examples(example_name, good_code, bad_code, complex_code)` β Run standard validation examples (good, bad, complex code).
304302- `validate_code_example(name, code, settings, all_results)` β Validate a code example and store results.
305303- `print_summary(all_results)` β Print summary of all validation results.
306- - `extract_code_from_response(response, language)` β Extract code from LLM response.
307- - `extract_json_from_response(response)` β Extract JSON object from LLM response.
308- - `save_analysis_data(example_name, result_data)` β Save analysis data to JSON file.
309- - `extract_code_from_response(response)` β Extract Python code from LLM response.
310- - `run_validation_examples(example_name, good_code, bad_code, complex_code)` β Run standard validation examples (good, bad, complex code).
311304- `log_section(title)` β Print a section header.
312305- `log_step(step, description)` β Print a step.
313306- `log_code(label, code, max_lines)` β Log code with label.
@@ -317,10 +310,15 @@ vallm/
317310- `generate_refactoring_prompt(code, analysis)` β Generate prompt for LLM to refactor code.
318311- `run_mcp_workflow(code_path, max_iterations)` β Run the complete MCP workflow.
319312- `main()` β Main entry point.
313+ - `extract_code_from_response(response, language)` β Extract code from LLM response.
314+ - `extract_json_from_response(response)` β Extract JSON object from LLM response.
315+ - `save_analysis_data(example_name, result_data)` β Save analysis data to JSON file.
316+ - `extract_code_from_response(response)` β Extract Python code from LLM response.
320317- `log_section(title)` β Print a section header.
321318- `log_step(step, description)` β Print a step indicator.
322319- `log_code(label, code, max_lines)` β Log code with label and truncation.
323320- `log_result(status, message)` β Log a result with appropriate color.
321+ - `run_validation_examples(example_name, good_code, bad_code, complex_code)` β Run standard validation examples (good, bad, complex code).
324322- `process_order(data)` β Process order data - has multiple issues.
325323- `load_config()` β Load config - security issue with eval.
326324- `save_data(data, filename)` β Save data - uses pickle without validation.
@@ -335,16 +333,16 @@ vallm/
335333- `generate_report(code2llm_result, vallm_result, output_path)` β Generate combined analysis report.
336334- `main()` β Main example function.
337335- `process_user_input(user_input)` β Process user input with standard logic.
336+ - `load_config()` β Load configuration with default values.
338337- `process_user_input(user_input)` β Process user input with security issues.
339338- `load_config()` β Load configuration with eval.
340339- `save_data(data, filename)` β Save data without validation.
341340- `calculate_total(items)` β Calculate total with no error handling.
342341- `duplicate_function()` β Another duplicate function.
343342- `unused_function()` β This function is never used.
344343- `main()` β Main function with problems.
345- - `load_config()` β Load configuration with default values.
346- - `run_demo_main()` β Run the standard demo main function pattern.
347344- `calculate_total(items)` β Calculate total price from items list.
345+ - `run_demo_main()` β Run the standard demo main function pattern.
348346- `save_data(data, filename)` β Save data to JSON file.
349347- `run_example()` β β
350348- `print_section()` β β
@@ -369,6 +367,7 @@ vallm/
369367
370368## Project Structure
371369
370+ π¦ `examples`
372371π `examples.01_basic_validation.main` (1 functions)
373372π `examples.02_ast_comparison.main` (1 functions)
374373π `examples.03_security_check.main` (1 functions)
@@ -416,7 +415,6 @@ vallm/
416415π¦ `src.vallm.cli`
417416π `src.vallm.cli.batch_processor` (12 functions, 1 classes)
418417π `src.vallm.cli.command_handlers` (11 functions)
419- π `src.vallm.cli.optimized_batch_processor` (13 functions, 1 classes)
420418π `src.vallm.cli.output_formatters` (13 functions)
421419π `src.vallm.config` (1 functions, 1 classes)
422420π¦ `src.vallm.core`
@@ -438,8 +436,8 @@ vallm/
438436π `src.vallm.validators.imports.factory` (3 functions, 1 classes)
439437π `src.vallm.validators.imports.go_imports` (5 functions, 1 classes)
440438π `src.vallm.validators.imports.java_imports` (5 functions, 1 classes)
441- π `src.vallm.validators.imports.javascript_imports` (4 functions, 1 classes)
442- π `src.vallm.validators.imports.python_imports` (3 functions, 1 classes)
439+ π `src.vallm.validators.imports.javascript_imports` (7 functions, 1 classes)
440+ π `src.vallm.validators.imports.python_imports` (6 functions, 1 classes)
443441π `src.vallm.validators.imports.rust_imports` (5 functions, 1 classes)
444442π `src.vallm.validators.imports.utils` (2 functions)
445443π `src.vallm.validators.imports.wrapper` (1 functions, 1 classes)
0 commit comments