mirror of
https://github.com/ludo-technologies/pyscn.git
synced 2025-10-06 00:59:45 +03:00
chore: remove outputs
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -72,6 +72,9 @@ python/src/pyscn/bin/
|
|||||||
/testdata/temp/
|
/testdata/temp/
|
||||||
/testdata/output/
|
/testdata/output/
|
||||||
|
|
||||||
|
# pyscn output directory
|
||||||
|
.pyscn/
|
||||||
|
|
||||||
# Claude Code setting
|
# Claude Code setting
|
||||||
.claude/
|
.claude/
|
||||||
|
|
||||||
|
|||||||
@@ -1,412 +0,0 @@
|
|||||||
{
|
|
||||||
"clones": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 48,
|
|
||||||
"end_line": 65,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 23
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 11,
|
|
||||||
"line_count": 18,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 75,
|
|
||||||
"end_line": 100,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 29
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 18,
|
|
||||||
"line_count": 26,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 129,
|
|
||||||
"end_line": 145,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 25
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 25,
|
|
||||||
"line_count": 17,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 21,
|
|
||||||
"end_line": 27,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 22
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 13,
|
|
||||||
"line_count": 7,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 133,
|
|
||||||
"end_line": 146,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 26
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 14,
|
|
||||||
"line_count": 14,
|
|
||||||
"complexity": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"clone_pairs": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"clone1": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 75,
|
|
||||||
"end_line": 100,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 29
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 18,
|
|
||||||
"line_count": 26,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"clone2": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 129,
|
|
||||||
"end_line": 145,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 25
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 25,
|
|
||||||
"line_count": 17,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"similarity": 0.9558139534883721,
|
|
||||||
"distance": 1.9,
|
|
||||||
"type": 1,
|
|
||||||
"confidence": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"clone1": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 48,
|
|
||||||
"end_line": 65,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 23
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 11,
|
|
||||||
"line_count": 18,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"clone2": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 133,
|
|
||||||
"end_line": 146,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 26
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 14,
|
|
||||||
"line_count": 14,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"similarity": 0.724,
|
|
||||||
"distance": 6.8999999999999995,
|
|
||||||
"type": 3,
|
|
||||||
"confidence": 0.849
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"clone1": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 21,
|
|
||||||
"end_line": 27,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 22
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 13,
|
|
||||||
"line_count": 7,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"clone2": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 133,
|
|
||||||
"end_line": 146,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 26
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 14,
|
|
||||||
"line_count": 14,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"similarity": 0.6814814814814816,
|
|
||||||
"distance": 8.6,
|
|
||||||
"type": 4,
|
|
||||||
"confidence": 0.8164814814814816
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"clone1": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 75,
|
|
||||||
"end_line": 100,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 29
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 18,
|
|
||||||
"line_count": 26,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"clone2": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 133,
|
|
||||||
"end_line": 146,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 26
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 14,
|
|
||||||
"line_count": 14,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"similarity": 0.628125,
|
|
||||||
"distance": 11.899999999999999,
|
|
||||||
"type": 4,
|
|
||||||
"confidence": 0.7881250000000001
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"clone1": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 48,
|
|
||||||
"end_line": 65,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 23
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 11,
|
|
||||||
"line_count": 18,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"clone2": {
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 75,
|
|
||||||
"end_line": 100,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 29
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 18,
|
|
||||||
"line_count": 26,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
"similarity": 0.6275862068965518,
|
|
||||||
"distance": 10.799999999999999,
|
|
||||||
"type": 4,
|
|
||||||
"confidence": 0.7725862068965518
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"clone_groups": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"clones": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 75,
|
|
||||||
"end_line": 100,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 29
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 18,
|
|
||||||
"line_count": 26,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 129,
|
|
||||||
"end_line": 145,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 25
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 25,
|
|
||||||
"line_count": 17,
|
|
||||||
"complexity": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": 1,
|
|
||||||
"similarity": 0.9558139534883721,
|
|
||||||
"size": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"clones": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/classes.py",
|
|
||||||
"start_line": 48,
|
|
||||||
"end_line": 65,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 23
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 11,
|
|
||||||
"line_count": 18,
|
|
||||||
"complexity": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"type": 0,
|
|
||||||
"location": {
|
|
||||||
"file_path": "testdata/python/simple/control_flow.py",
|
|
||||||
"start_line": 133,
|
|
||||||
"end_line": 146,
|
|
||||||
"start_col": 0,
|
|
||||||
"end_col": 26
|
|
||||||
},
|
|
||||||
"hash": "",
|
|
||||||
"size": 14,
|
|
||||||
"line_count": 14,
|
|
||||||
"complexity": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": 3,
|
|
||||||
"similarity": 0.724,
|
|
||||||
"size": 2
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"statistics": {
|
|
||||||
"total_clones": 5,
|
|
||||||
"total_clone_pairs": 5,
|
|
||||||
"total_clone_groups": 2,
|
|
||||||
"clones_by_type": {
|
|
||||||
"Type-1": 1,
|
|
||||||
"Type-3": 1,
|
|
||||||
"Type-4": 3
|
|
||||||
},
|
|
||||||
"average_similarity": 0.7234013283732812,
|
|
||||||
"lines_analyzed": 510,
|
|
||||||
"files_analyzed": 5
|
|
||||||
},
|
|
||||||
"request": {
|
|
||||||
"paths": [
|
|
||||||
"testdata/python/simple/classes.py",
|
|
||||||
"testdata/python/simple/control_flow.py",
|
|
||||||
"testdata/python/simple/dead_code_simple.py",
|
|
||||||
"testdata/python/simple/functions.py",
|
|
||||||
"testdata/python/simple/imports.py"
|
|
||||||
],
|
|
||||||
"recursive": true,
|
|
||||||
"include_patterns": [
|
|
||||||
"*.py"
|
|
||||||
],
|
|
||||||
"exclude_patterns": [
|
|
||||||
"test_*.py",
|
|
||||||
"*_test.py",
|
|
||||||
"__pycache__/*"
|
|
||||||
],
|
|
||||||
"min_lines": 5,
|
|
||||||
"min_nodes": 10,
|
|
||||||
"similarity_threshold": 0.8,
|
|
||||||
"max_edit_distance": 50,
|
|
||||||
"ignore_literals": false,
|
|
||||||
"ignore_identifiers": false,
|
|
||||||
"type1_threshold": 0.95,
|
|
||||||
"type2_threshold": 0.85,
|
|
||||||
"type3_threshold": 0.7,
|
|
||||||
"type4_threshold": 0.6,
|
|
||||||
"output_format": "json",
|
|
||||||
"output_path": "clone_20250912_002954.json",
|
|
||||||
"no_open": true,
|
|
||||||
"show_details": false,
|
|
||||||
"show_content": false,
|
|
||||||
"sort_by": "similarity",
|
|
||||||
"group_clones": true,
|
|
||||||
"group_mode": "",
|
|
||||||
"group_threshold": 0,
|
|
||||||
"k_core_k": 0,
|
|
||||||
"min_similarity": 0,
|
|
||||||
"max_similarity": 1,
|
|
||||||
"clone_types": [
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4
|
|
||||||
],
|
|
||||||
"config_path": "",
|
|
||||||
"timeout": 0,
|
|
||||||
"use_lsh": false,
|
|
||||||
"lsh_similarity_threshold": 0,
|
|
||||||
"lsh_bands": 0,
|
|
||||||
"lsh_rows": 0,
|
|
||||||
"lsh_hashes": 0
|
|
||||||
},
|
|
||||||
"duration_ms": 6,
|
|
||||||
"success": true
|
|
||||||
}
|
|
||||||
@@ -1,704 +0,0 @@
|
|||||||
{
|
|
||||||
"metadata": {
|
|
||||||
"configuration": {
|
|
||||||
"exclude_patterns": [
|
|
||||||
"test_*.py",
|
|
||||||
"*_test.py",
|
|
||||||
"__pycache__/*"
|
|
||||||
],
|
|
||||||
"include_patterns": [
|
|
||||||
"*.py"
|
|
||||||
],
|
|
||||||
"low_threshold": 9,
|
|
||||||
"max_complexity": 0,
|
|
||||||
"medium_threshold": 19,
|
|
||||||
"min_complexity": 1,
|
|
||||||
"output_format": "json",
|
|
||||||
"recursive": true,
|
|
||||||
"show_details": false,
|
|
||||||
"sort_by": "name"
|
|
||||||
},
|
|
||||||
"files_analyzed": 5,
|
|
||||||
"generated_at": "2025-09-12T00:30:02+09:00",
|
|
||||||
"version": "dev"
|
|
||||||
},
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"complexity": 2,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 1,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "AbstractClass.abstract_method",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "AbstractClass.concrete_method",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithClassVar.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithClassVar.get_class_var",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithClassVar.static_method",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/imports.py",
|
|
||||||
"function_name": "ClassWithImport.method_with_import",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__add__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__call__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__eq__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__getitem__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__len__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__repr__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithMagicMethods.__str__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithProperties.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithProperties.value",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "ClassWithSlots.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "InheritedClass.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "InheritedClass.get_extra",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "NestedClass.Inner.inner_method",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "NestedClass.outer_method",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "SimpleClass.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "SimpleClass.get_value",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "SimpleClass.set_value",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "TypedClass.__init__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "TypedClass.add_item",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "TypedClass.get_items",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 1,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "__main__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 0,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 33,
|
|
||||||
"edges": 116,
|
|
||||||
"exception_handlers": 10,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/control_flow.py",
|
|
||||||
"function_name": "__main__",
|
|
||||||
"if_statements": 22,
|
|
||||||
"loop_statements": 11,
|
|
||||||
"nodes": 85,
|
|
||||||
"risk_level": "high",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 3,
|
|
||||||
"edges": 11,
|
|
||||||
"exception_handlers": 1,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/imports.py",
|
|
||||||
"function_name": "__main__",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 8,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 14,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/classes.py",
|
|
||||||
"function_name": "__main__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 13,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 1,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "__main__",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 0,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/imports.py",
|
|
||||||
"function_name": "_private_function",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "async_function",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "async_with_await",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 2,
|
|
||||||
"edges": 5,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "conditional_dead_code",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 3,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 3,
|
|
||||||
"edges": 5,
|
|
||||||
"exception_handlers": 1,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "exception_dead_code",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 3,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_all",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_annotations",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_args",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_defaults",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/imports.py",
|
|
||||||
"function_name": "function_with_import",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_kwargs",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "function_with_params",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 3,
|
|
||||||
"edges": 9,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "generator_with_condition",
|
|
||||||
"if_statements": 2,
|
|
||||||
"loop_statements": 1,
|
|
||||||
"nodes": 6,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 2,
|
|
||||||
"edges": 6,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "generator_with_loop",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 1,
|
|
||||||
"nodes": 4,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 3,
|
|
||||||
"edges": 9,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "loop_with_dead_code",
|
|
||||||
"if_statements": 2,
|
|
||||||
"loop_statements": 1,
|
|
||||||
"nodes": 6,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "nested_function",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 3,
|
|
||||||
"edges": 8,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "nested_return_dead_code",
|
|
||||||
"if_statements": 2,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 5,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 2,
|
|
||||||
"edges": 16,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/control_flow.py",
|
|
||||||
"function_name": "process_value",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 9,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/imports.py",
|
|
||||||
"function_name": "public_function",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 2,
|
|
||||||
"edges": 5,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "recursive_function",
|
|
||||||
"if_statements": 1,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 3,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"function_name": "simple_dead_code",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "simple_function",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"complexity": 1,
|
|
||||||
"edges": 2,
|
|
||||||
"exception_handlers": 0,
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/functions.py",
|
|
||||||
"function_name": "simple_generator",
|
|
||||||
"if_statements": 0,
|
|
||||||
"loop_statements": 0,
|
|
||||||
"nodes": 1,
|
|
||||||
"risk_level": "low",
|
|
||||||
"switch_cases": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": {
|
|
||||||
"average_complexity": 1.8545454545454545,
|
|
||||||
"complexity_distribution": {
|
|
||||||
"1": 44,
|
|
||||||
"2-5": 10,
|
|
||||||
"21+": 1
|
|
||||||
},
|
|
||||||
"files_analyzed": 5,
|
|
||||||
"max_complexity": 33,
|
|
||||||
"min_complexity": 1,
|
|
||||||
"risk_distribution": {
|
|
||||||
"high": 1,
|
|
||||||
"low": 54,
|
|
||||||
"medium": 0
|
|
||||||
},
|
|
||||||
"total_functions": 55
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
{
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"name": "simple_dead_code",
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"findings": [
|
|
||||||
{
|
|
||||||
"location": {
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"start_line": 12,
|
|
||||||
"end_line": 13,
|
|
||||||
"start_column": 0,
|
|
||||||
"end_column": 0
|
|
||||||
},
|
|
||||||
"function_name": "simple_dead_code",
|
|
||||||
"code": "Call\nassignment",
|
|
||||||
"reason": "unreachable_after_return",
|
|
||||||
"severity": "critical",
|
|
||||||
"description": "Code appears after a return statement and will never be executed",
|
|
||||||
"block_id": "bb3"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"total_blocks": 4,
|
|
||||||
"dead_blocks": 1,
|
|
||||||
"reachable_ratio": 0.75,
|
|
||||||
"critical_count": 1,
|
|
||||||
"warning_count": 0,
|
|
||||||
"info_count": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "loop_with_dead_code",
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"findings": [
|
|
||||||
{
|
|
||||||
"location": {
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"start_line": 34,
|
|
||||||
"end_line": 34,
|
|
||||||
"start_column": 0,
|
|
||||||
"end_column": 0
|
|
||||||
},
|
|
||||||
"function_name": "loop_with_dead_code",
|
|
||||||
"code": "Call",
|
|
||||||
"reason": "unreachable_after_break",
|
|
||||||
"severity": "critical",
|
|
||||||
"description": "Code appears after a break statement and will never be executed",
|
|
||||||
"block_id": "bb8"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"total_blocks": 10,
|
|
||||||
"dead_blocks": 1,
|
|
||||||
"reachable_ratio": 0.8,
|
|
||||||
"critical_count": 1,
|
|
||||||
"warning_count": 0,
|
|
||||||
"info_count": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "nested_return_dead_code",
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"findings": [
|
|
||||||
{
|
|
||||||
"location": {
|
|
||||||
"file_path": "/Users/daisukeyoda/projects/pyqol/testdata/python/simple/dead_code_simple.py",
|
|
||||||
"start_line": 60,
|
|
||||||
"end_line": 60,
|
|
||||||
"start_column": 0,
|
|
||||||
"end_column": 0
|
|
||||||
},
|
|
||||||
"function_name": "nested_return_dead_code",
|
|
||||||
"code": "Call",
|
|
||||||
"reason": "unreachable_after_return",
|
|
||||||
"severity": "critical",
|
|
||||||
"description": "Code appears after a return statement and will never be executed",
|
|
||||||
"block_id": "bb7"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"total_blocks": 9,
|
|
||||||
"dead_blocks": 1,
|
|
||||||
"reachable_ratio": 0.7777777777777778,
|
|
||||||
"critical_count": 1,
|
|
||||||
"warning_count": 0,
|
|
||||||
"info_count": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"total_findings": 3,
|
|
||||||
"total_functions": 5,
|
|
||||||
"affected_functions": 3,
|
|
||||||
"dead_code_ratio": 0.13043478260869565
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": {
|
|
||||||
"total_files": 1,
|
|
||||||
"total_functions": 5,
|
|
||||||
"total_findings": 3,
|
|
||||||
"files_with_dead_code": 1,
|
|
||||||
"functions_with_dead_code": 3,
|
|
||||||
"critical_findings": 3,
|
|
||||||
"warning_findings": 0,
|
|
||||||
"info_findings": 0,
|
|
||||||
"findings_by_reason": {
|
|
||||||
"unreachable_after_break": 1,
|
|
||||||
"unreachable_after_return": 2
|
|
||||||
},
|
|
||||||
"total_blocks": 23,
|
|
||||||
"dead_blocks": 3,
|
|
||||||
"overall_dead_ratio": 0.13043478260869565
|
|
||||||
},
|
|
||||||
"warnings": null,
|
|
||||||
"errors": null,
|
|
||||||
"generated_at": "2025-09-12T00:29:58+09:00",
|
|
||||||
"version": "dev",
|
|
||||||
"config": {
|
|
||||||
"context_lines": 3,
|
|
||||||
"detect_after_break": true,
|
|
||||||
"detect_after_continue": true,
|
|
||||||
"detect_after_raise": true,
|
|
||||||
"detect_after_return": true,
|
|
||||||
"detect_unreachable_branches": true,
|
|
||||||
"exclude_patterns": [
|
|
||||||
"test_*.py",
|
|
||||||
"*_test.py",
|
|
||||||
"__pycache__/*"
|
|
||||||
],
|
|
||||||
"ignore_patterns": [],
|
|
||||||
"include_patterns": [
|
|
||||||
"*.py"
|
|
||||||
],
|
|
||||||
"min_severity": "warning",
|
|
||||||
"show_context": false,
|
|
||||||
"sort_by": "severity"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user