11<!-- code2docs:start --> # vallm
22
33![ 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
4+ > ** 322** functions | ** 40** classes | ** 82** files | CC̄ = 3.5
55
66> Auto-generated project documentation from source code analysis.
77
@@ -151,18 +151,18 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
151151
152152```
153153vallm/
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```
154+ ├── bump_version ├── cli/├── examples/ ├── hookspecs ├── vallm/ ├── __main__ ├── base ├── logical ├── complexity ├── validators/ ├── security ├── semantic_cache ├── syntax ├── lint ├── semantic ├── imports/ ├── 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 ├── mcp_demo ├── runner ├── utils/ ├── save_analysis_data ├── extraction ├── extract_code_from_response ├── logging_utils ├── validation_runner ├── order_processor ├── main ├── simple_buggy ├── load_config ├── utils/ ├── process_user_input ├── 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
158158### Classes
159159
160160- **`VallmSpec`** — Hook specifications that validators must implement.
161161- **`BaseValidator`** — Base class for all vallm validators.
162- - **`ComplexityValidator`** — Tier 2: Cyclomatic complexity, maintainability index, and function metrics.
163162- **`LogicalErrorValidator`** — Validator for logical errors using pyflakes.
164- - **`SemanticCache `** — Cache for semantic validation results to improve performance .
163+ - **`ComplexityValidator `** — Tier 2: Cyclomatic complexity, maintainability index, and function metrics .
165164- **`SecurityValidator`** — Tier 2: Security analysis using built-in patterns and optionally bandit.
165+ - **`SemanticCache`** — Cache for semantic validation results to improve performance.
166166- **`SyntaxValidator`** — Tier 1: Fast syntax validation.
167167- **`LintValidator`** — Validator for linting issues using ruff.
168168- **`SemanticValidator`** — Tier 3: LLM-as-judge semantic code review.
@@ -188,9 +188,9 @@ vallm/
188188- **`Colors`** — —
189189- **`Colors`** — —
190190- **`OrderManager`** — Class with single responsibility - adheres to SOLID principles.
191+ - **`Colors`** — —
191192- **`ExecutionResult`** — Result of sandboxed code execution.
192193- **`SandboxRunner`** — Unified interface for running code in a sandbox.
193- - **`Colors`** — —
194194- **`Colors`** — ANSI color codes for terminal output.
195195- **`OrderManager`** — Class with mixed responsibilities - SOLID violation.
196196- **`BadClass`** — Class with multiple issues.
@@ -229,9 +229,9 @@ vallm/
229229- `output_rich(result, verbose)` — Output rich formatted validation result.
230230- `output_batch_rich(results_by_language, filtered_files, passed_count, failed_files)` — Output rich formatted batch summary.
231231- `output_batch_text(results_by_language, filtered_files, passed_count, failed_files)` — Output plain text batch summary.
232- - `output_batch_json(results_by_language, filtered_files, passed_count, failed_files)` — Output JSON batch summary.
233- - `output_batch_yaml(results_by_language, filtered_files, passed_count, failed_files)` — Output YAML batch summary.
234- - `output_batch_toon(results_by_language, filtered_files, passed_count, failed_files)` — Output TOON format batch summary.
232+ - `output_batch_json(results_by_language, filtered_files, passed_count, failed_files)` — Output JSON batch summary with detailed per-file results .
233+ - `output_batch_yaml(results_by_language, filtered_files, passed_count, failed_files)` — Output YAML batch summary with detailed per-file results .
234+ - `output_batch_toon(results_by_language, filtered_files, passed_count, failed_files)` — Output TOON format batch summary with detailed per-file results .
235235- `print_summary_header()` — Print summary header for batch results.
236236- `build_results_table(results_by_language)` — Build results table for rich output.
237237- `detect_language(source)` — Auto-detect language from file path, extension, or name.
@@ -297,10 +297,6 @@ vallm/
297297- `save_data(data, filename)` — Save data safely using json.dump.
298298- `process_order(data)` — Process order data with proper error handling and validation.
299299- `main()` — —
300- - `save_analysis_data(example_name, result_data)` — Save analysis data to .vallm folder.
301- - `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
302- - `validate_code_example(name, code, settings, all_results)` — Validate a code example and store results.
303- - `print_summary(all_results)` — Print summary of all validation results.
304300- `log_section(title)` — Print a section header.
305301- `log_step(step, description)` — Print a step.
306302- `log_code(label, code, max_lines)` — Log code with label.
@@ -310,9 +306,13 @@ vallm/
310306- `generate_refactoring_prompt(code, analysis)` — Generate prompt for LLM to refactor code.
311307- `run_mcp_workflow(code_path, max_iterations)` — Run the complete MCP workflow.
312308- `main()` — Main entry point.
309+ - `save_analysis_data(example_name, result_data)` — Save analysis data to .vallm folder.
310+ - `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
311+ - `validate_code_example(name, code, settings, all_results)` — Validate a code example and store results.
312+ - `print_summary(all_results)` — Print summary of all validation results.
313+ - `save_analysis_data(example_name, result_data)` — Save analysis data to JSON file.
313314- `extract_code_from_response(response, language)` — Extract code from LLM response.
314315- `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.
316316- `extract_code_from_response(response)` — Extract Python code from LLM response.
317317- `log_section(title)` — Print a section header.
318318- `log_step(step, description)` — Print a step indicator.
@@ -332,15 +332,15 @@ vallm/
332332- `validate_with_vallm(project_path)` — Validate all Python files with vallm.
333333- `generate_report(code2llm_result, vallm_result, output_path)` — Generate combined analysis report.
334334- `main()` — Main example function.
335- - `process_user_input(user_input)` — Process user input with standard logic.
336- - `load_config()` — Load configuration with default values.
337335- `process_user_input(user_input)` — Process user input with security issues.
338336- `load_config()` — Load configuration with eval.
339337- `save_data(data, filename)` — Save data without validation.
340338- `calculate_total(items)` — Calculate total with no error handling.
341339- `duplicate_function()` — Another duplicate function.
342340- `unused_function()` — This function is never used.
343341- `main()` — Main function with problems.
342+ - `load_config()` — Load configuration with default values.
343+ - `process_user_input(user_input)` — Process user input with standard logic.
344344- `calculate_total(items)` — Calculate total price from items list.
345345- `run_demo_main()` — Run the standard demo main function pattern.
346346- `save_data(data, filename)` — Save data to JSON file.
0 commit comments