code2llm 0.5.58__tar.gz → 0.5.60__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code2llm-0.5.58 → code2llm-0.5.60}/PKG-INFO +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/__init__.py +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_parser.py +3 -3
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/index_generator.py +32 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/map_exporter.py +1 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/project_yaml_exporter.py +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/readme_exporter.py +5 -5
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/report_generators.py +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon/metrics.py +6 -6
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon/renderer.py +2 -2
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/__init__.py +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/PKG-INFO +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/pyproject.toml +1 -1
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_format_quality.py +4 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/LICENSE +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/README.md +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/__main__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/call_graph.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/cfg.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/coupling.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/data_analysis.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/dfg.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/pipeline_detector.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/side_effects.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/smells.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/analysis/type_inference.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/api.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_analysis.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_commands.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_exports/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_exports/code2logic.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_exports/formats.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_exports/orchestrator.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/cli_exports/prompt.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/analyzer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/config.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/file_analyzer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/file_cache.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/file_filter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/base.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/cpp.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/csharp.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/generic.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/go_lang.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/java.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/php.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/ruby.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/rust.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/lang/typescript.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/core/refactoring.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/gitignore.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/large_repo.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/models.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/repo_files.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/cache.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/incremental.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/prioritizer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/scanner.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming/strategies.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/streaming_analyzer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/core/toon_size_manager.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/article_view.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/base.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/context_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/context_view.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/evolution_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/flow_constants.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/flow_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/flow_renderer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/html_dashboard.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/json_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/llm_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/mermaid_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon/helpers.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon/module_detail.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/toon_view.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/validate_project.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/exporters/yaml_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/generators/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/generators/llm_flow.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/generators/llm_task.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/generators/mermaid.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/config.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/entity_resolution.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/intent_matching.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/normalization.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/nlp/pipeline.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/patterns/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/patterns/detector.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/refactor/__init__.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm/refactor/prompt_engine.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/SOURCES.txt +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/dependency_links.txt +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/entry_points.txt +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/requires.txt +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/code2llm.egg-info/top_level.txt +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/setup.cfg +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/setup.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_advanced_analysis.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_analyzer.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_deep_analysis.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_edge_cases.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_flow_exporter.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_multilanguage_e2e.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_nlp_pipeline.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_nonpython_cc_calls.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_pipeline_detector.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_prompt_engine.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_prompt_txt.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_refactoring_engine.py +0 -0
- {code2llm-0.5.58 → code2llm-0.5.60}/tests/test_toon_v2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2llm
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.60
|
|
4
4
|
Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
|
|
5
5
|
Home-page: https://github.com/wronai/stts
|
|
6
6
|
Author: STTS Project
|
|
@@ -8,7 +8,7 @@ Includes NLP Processing Pipeline for query normalization, intent matching,
|
|
|
8
8
|
and entity resolution with multilingual support.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
__version__ = "0.5.
|
|
11
|
+
__version__ = "0.5.60"
|
|
12
12
|
__author__ = "STTS Project"
|
|
13
13
|
|
|
14
14
|
# Core analysis components (lightweight, always needed)
|
|
@@ -14,10 +14,10 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
14
14
|
epilog='''
|
|
15
15
|
Examples:
|
|
16
16
|
code2llm ./ # Default: TOON diagnostics + README
|
|
17
|
-
code2llm ./ -f all -o ./docs #
|
|
17
|
+
code2llm ./ -f all -o ./docs # All formats to ./docs/
|
|
18
18
|
code2llm ./ -f toon,map,evolution # Consolidated diagnostics + structure + roadmap
|
|
19
19
|
code2llm ./ -f context # LLM narrative (context.md)
|
|
20
|
-
code2llm ./ --streaming --strategy deep -f all # Deep streaming analysis,
|
|
20
|
+
code2llm ./ --streaming --strategy deep -f all # Deep streaming analysis, all outputs
|
|
21
21
|
code2llm ./ --strategy quick -f toon # Fast overview
|
|
22
22
|
code2llm ./ --refactor # AI refactoring prompts
|
|
23
23
|
code2llm ./ --refactor --smell god_function # Filter by smell type
|
|
@@ -27,7 +27,7 @@ Examples:
|
|
|
27
27
|
code2llm ./ -m static -v -o ./analysis # Static mode, verbose
|
|
28
28
|
code2llm ./ --no-readme # Disable README generation
|
|
29
29
|
code2llm ./ -f project-yaml # Unified project.yaml (single source of truth)
|
|
30
|
-
code2llm report --format toon # Generate
|
|
30
|
+
code2llm report --format toon # Generate view from project.yaml
|
|
31
31
|
code2llm report --format all # All views from project.yaml
|
|
32
32
|
code2llm llm-flow # Generate LLM flow summary
|
|
33
33
|
code2llm llm-context ./ # Generate LLM context only
|
|
@@ -120,6 +120,10 @@ class IndexHTMLGenerator:
|
|
|
120
120
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
121
121
|
<title>code2llm Analysis Results</title>
|
|
122
122
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
123
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
|
124
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
|
125
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
126
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/json.min.js"></script>
|
|
123
127
|
<style>
|
|
124
128
|
:root {{
|
|
125
129
|
--bg: #0f172a;
|
|
@@ -517,6 +521,20 @@ class IndexHTMLGenerator:
|
|
|
517
521
|
margin: 1.5rem 0;
|
|
518
522
|
}}
|
|
519
523
|
|
|
524
|
+
/* Mermaid diagram styles */
|
|
525
|
+
.mermaid-content {{
|
|
526
|
+
display: flex;
|
|
527
|
+
justify-content: center;
|
|
528
|
+
padding: 1rem;
|
|
529
|
+
background: var(--surface);
|
|
530
|
+
border-radius: 0.5rem;
|
|
531
|
+
border: 1px solid var(--border);
|
|
532
|
+
}}
|
|
533
|
+
|
|
534
|
+
.mermaid-content .mermaid {{
|
|
535
|
+
background: transparent;
|
|
536
|
+
}}
|
|
537
|
+
|
|
520
538
|
/* Mobile responsive */
|
|
521
539
|
@media (max-width: 768px) {{
|
|
522
540
|
.container {{
|
|
@@ -603,6 +621,9 @@ class IndexHTMLGenerator:
|
|
|
603
621
|
</div>
|
|
604
622
|
|
|
605
623
|
<script>
|
|
624
|
+
// Initialize mermaid
|
|
625
|
+
mermaid.initialize({{ startOnLoad: false, theme: 'dark' }});
|
|
626
|
+
|
|
606
627
|
const files = {files_json};
|
|
607
628
|
let currentFile = null;
|
|
608
629
|
|
|
@@ -673,10 +694,20 @@ class IndexHTMLGenerator:
|
|
|
673
694
|
}} else if (file.type === 'html') {{
|
|
674
695
|
// For HTML files, show in iframe for safety
|
|
675
696
|
body.innerHTML = `<iframe src="${{file.rel_path}}" style="width:100%;height:100%;border:none;border-radius:0.5rem;"></iframe>`;
|
|
697
|
+
}} else if (file.type === 'mermaid') {{
|
|
698
|
+
// Render mermaid diagram
|
|
699
|
+
const diagramId = 'mermaid-diagram-' + Date.now();
|
|
700
|
+
body.innerHTML = `<div class="mermaid-content"><pre class="mermaid" id="${{diagramId}}">${{file.content}}</pre></div>`;
|
|
701
|
+
// Initialize mermaid on the new element
|
|
702
|
+
setTimeout(() => {{
|
|
703
|
+
mermaid.init(undefined, document.getElementById(diagramId));
|
|
704
|
+
}}, 0);
|
|
676
705
|
}} else if (file.type === 'json') {{
|
|
677
706
|
try {{
|
|
678
707
|
const json = JSON.parse(file.content.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'));
|
|
679
|
-
|
|
708
|
+
const formatted = JSON.stringify(json, null, 2);
|
|
709
|
+
body.innerHTML = `<pre><code class="language-json">${{formatted.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}}</code></pre>`;
|
|
710
|
+
hljs.highlightElement(body.querySelector('code'));
|
|
680
711
|
}} catch {{
|
|
681
712
|
body.innerHTML = `<pre>${{file.content}}</pre>`;
|
|
682
713
|
}}
|
|
@@ -35,7 +35,7 @@ GOD_MODULE_LINES = 500
|
|
|
35
35
|
class ProjectYAMLExporter(Exporter):
|
|
36
36
|
"""Export unified project.yaml — single source of truth for diagnostics.
|
|
37
37
|
|
|
38
|
-
Combines data from analysis.toon,
|
|
38
|
+
Combines data from analysis.toon, project.toon, context.md, and evolution.toon
|
|
39
39
|
into one machine-parseable YAML file.
|
|
40
40
|
"""
|
|
41
41
|
|
|
@@ -206,7 +206,7 @@ grep "SIDE_EFFECTS" flow.toon
|
|
|
206
206
|
**Key sections**:
|
|
207
207
|
- **MODULES**: All modules with basic stats
|
|
208
208
|
- **IMPORTS**: Dependency relationships
|
|
209
|
-
- **
|
|
209
|
+
- **EXPORTS**: Public API surface and signatures
|
|
210
210
|
- **HEADER**: Stats, alerts, hotspots, evolution trend
|
|
211
211
|
|
|
212
212
|
**Example usage**:
|
|
@@ -215,7 +215,7 @@ grep "SIDE_EFFECTS" flow.toon
|
|
|
215
215
|
cat map.toon | head -50
|
|
216
216
|
|
|
217
217
|
# Find public APIs
|
|
218
|
-
grep "
|
|
218
|
+
grep "SIGNATURES" map.toon
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
### `project.toon` - Legacy Project Logic (Deprecated)
|
|
@@ -425,9 +425,9 @@ For more information about code2llm, visit: https://github.com/tom-sapletta/code
|
|
|
425
425
|
files_to_check = {
|
|
426
426
|
'analysis.toon': 'Health diagnostics',
|
|
427
427
|
'evolution.toon': 'Refactoring queue',
|
|
428
|
-
'flow.toon': '
|
|
429
|
-
'map.toon': 'Structural map
|
|
430
|
-
'project.toon': '
|
|
428
|
+
'flow.toon': 'Data flow analysis',
|
|
429
|
+
'map.toon': 'Structural map',
|
|
430
|
+
'project.toon': 'Project logic',
|
|
431
431
|
'prompt.txt': 'LLM prompt',
|
|
432
432
|
'context.md': 'LLM narrative',
|
|
433
433
|
'analysis.yaml': 'YAML data',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Report generators — produce views from project.yaml (single source of truth).
|
|
2
2
|
|
|
3
3
|
Thin re-export module. Actual generators live in separate files:
|
|
4
|
-
toon_view.py → ToonViewGenerator → project.toon
|
|
4
|
+
toon_view.py → ToonViewGenerator → project.toon
|
|
5
5
|
context_view.py → ContextViewGenerator → context.md
|
|
6
6
|
article_view.py → ArticleViewGenerator → status.md
|
|
7
7
|
html_dashboard.py → HTMLDashboardGenerator → dashboard.html
|
|
@@ -437,17 +437,17 @@ class MetricsComputer:
|
|
|
437
437
|
|
|
438
438
|
def _check_smells_health(self, result, issues):
|
|
439
439
|
"""Check for code smells: CC, cycles, bottlenecks."""
|
|
440
|
-
|
|
440
|
+
CC_WARNING = 15
|
|
441
441
|
for smell in result.smells:
|
|
442
442
|
stype = smell.type
|
|
443
443
|
if stype == "god_function":
|
|
444
444
|
cc_val = smell.context.get("complexity", 0)
|
|
445
|
-
if cc_val >=
|
|
445
|
+
if cc_val >= CC_WARNING:
|
|
446
446
|
fname = smell.context.get("function", smell.name)
|
|
447
447
|
short = fname.split(".")[-1] if "." in fname else fname
|
|
448
448
|
issues.append({
|
|
449
449
|
"severity": "yellow", "code": "CC",
|
|
450
|
-
"message": f"{short} CC={cc_val} (limit:{
|
|
450
|
+
"message": f"{short} CC={cc_val} (limit:{CC_WARNING})",
|
|
451
451
|
"impact": "split method",
|
|
452
452
|
})
|
|
453
453
|
elif stype == "circular_dependency":
|
|
@@ -463,12 +463,12 @@ class MetricsComputer:
|
|
|
463
463
|
|
|
464
464
|
def _check_high_cc_health(self, ctx, issues):
|
|
465
465
|
"""Check for high CC functions not already caught by smells."""
|
|
466
|
-
|
|
467
|
-
high_cc = [f for f in ctx["func_metrics"] if f["cc"] >=
|
|
466
|
+
CC_WARNING = 15
|
|
467
|
+
high_cc = [f for f in ctx["func_metrics"] if f["cc"] >= CC_WARNING]
|
|
468
468
|
existing_cc_msgs = {i["message"] for i in issues if i["code"] == "CC"}
|
|
469
469
|
for fm in high_cc:
|
|
470
470
|
short = fm["name"]
|
|
471
|
-
msg = f"{short} CC={fm['cc']} (limit:{
|
|
471
|
+
msg = f"{short} CC={fm['cc']} (limit:{CC_WARNING})"
|
|
472
472
|
if msg not in existing_cc_msgs:
|
|
473
473
|
issues.append({
|
|
474
474
|
"severity": "yellow", "code": "CC",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2llm
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.60
|
|
4
4
|
Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
|
|
5
5
|
Home-page: https://github.com/wronai/stts
|
|
6
6
|
Author: STTS Project
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "code2llm"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.60"
|
|
8
8
|
description = "High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -53,11 +53,15 @@ def ground_truth_project(tmp_path_factory) -> Path:
|
|
|
53
53
|
return Result(errors=["empty"])
|
|
54
54
|
if not isinstance(data, list):
|
|
55
55
|
return Result(errors=["not list"])
|
|
56
|
+
if len(data) > config.max_items:
|
|
57
|
+
return Result(errors=["too many items"])
|
|
56
58
|
filtered = []
|
|
57
59
|
for item in data:
|
|
58
60
|
if isinstance(item, dict):
|
|
59
61
|
if "id" in item:
|
|
60
62
|
if item.get("active", True):
|
|
63
|
+
if config.debug:
|
|
64
|
+
print(f"Adding active: {item['id']}")
|
|
61
65
|
filtered.append(item)
|
|
62
66
|
elif config.debug:
|
|
63
67
|
filtered.append(item)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|