RepoMind report - sample_project
0/100 - grade F
11findings
0suppressed
7internal modules
1import cycles
Summary
1 critical 2 high 5 medium 3 low 0 info
complexity: 3 correctness: 1 dead-code: 3 dependencies: 1 design: 1 maintainability: 2
Findings (11)
| Severity | Rule | Location | Message | Suggestion |
|---|---|---|---|---|
| critical | complexity/high-cognitive-complexity | samplepkg/complex.py:4 | `samplepkg.complex.tangled_branches` has cognitive complexity 40 (warn >= 15). | Flatten nesting with guard clauses or extract the nested logic into a well-named helper. |
| high | correctness/syntax-error | samplepkg/broken.py:1 | `samplepkg/broken.py` cannot be parsed: line 3: invalid syntax. | Fix the syntax error, then run RepoMind again. |
| high | design/god-object | samplepkg/god.py:12 | Class `GodClass` in samplepkg/god.py looks like a god object (16 methods >= 15). | Identify cohesive responsibilities and extract them into collaborators; keep the class focused on one reason to change. |
| medium | dependencies/cyclic-import | samplepkg/a.py | 2 modules form an import cycle: samplepkg.a <-> samplepkg.b. | Extract the shared abstractions into a new module both sides can import, or invert one direction with an interface/protocol. |
| medium | complexity/deep-nesting | samplepkg/complex.py:4 | `samplepkg.complex.tangled_branches` nests control flow 5 levels deep (warn >= 4). | Use guard clauses, early returns or extract the inner blocks into separate functions. |
| medium | complexity/high-cyclomatic-complexity | samplepkg/complex.py:4 | `samplepkg.complex.tangled_branches` has cyclomatic complexity 13 (warn >= 10, critical >= 20). | Split the function into smaller pieces, extract helpers or replace nested branches with early returns. |
| medium | maintainability/too-many-parameters | samplepkg/complex.py:40 | `samplepkg.complex.too_many_parameters` takes 6 parameters (warn > 5). | Group related arguments into a dataclass or config object, or split the function by responsibility. |
| medium | maintainability/long-function | samplepkg/complex.py:52 | `samplepkg.complex.long_function` is 63 lines long (warn >= 60). | Look for cohesive blocks inside the function and extract them into named helpers. |
| low | dead-code/unused-import | samplepkg/dead.py:3 | `import json` in samplepkg/dead.py is never used. | Remove the import; if it exists for re-export purposes, make that explicit with an ``as`` alias or ``__all__``. |
| low | dead-code/unused-import | samplepkg/dead.py:4 | `from collections import Counter` in samplepkg/dead.py is never used. | Remove the import; if it exists for re-export purposes, make that explicit with an ``as`` alias or ``__all__``. |
| low | dead-code/unused-private-function | samplepkg/dead.py:17 | Private function `samplepkg.dead._never_used` is never referenced. | Delete it, or make it public if it is part of the intended API; dynamic usage hides under string lookups and can be whitelisted by configuring ``exclude``. |
Dependency graph
7 modules, 3 internal imports, 1 cycles, 2 external packages.
cycle: samplepkg.a <-> samplepkg.b
Thresholds used
cyclomatic_warn | 10 |
cyclomatic_high | 15 |
cyclomatic_critical | 20 |
cognitive_warn | 15 |
cognitive_high | 25 |
cognitive_critical | 40 |
function_length_warn | 60 |
function_length_high | 100 |
function_length_critical | 200 |
parameters_warn | 5 |
parameters_high | 8 |
nesting_warn | 4 |
nesting_high | 6 |
file_loc_warn | 400 |
file_loc_high | 800 |
file_loc_critical | 1500 |
god_object_methods | 15 |
god_object_loc | 250 |
god_object_wmc | 70 |
hotspot_min_cyclomatic | 10 |
hotspot_min_commits | 5 |