fix(CODEWIKI-005-2): CU-86akn96pk 2 review findings in csharp.py - #110
flamingo[bot] wants to merge 1 commit into
Conversation
| @@ -53,7 +53,7 @@ def _get_relative_path(self) -> str: | |||
|
|
|||
| def _get_component_id(self, name: str) -> str: | |||
There was a problem hiding this comment.
🦩 🔴 csharp analyzer generates component IDs without :: separator when repo_path is empty
In TreeSitterCSharpAnalyzer._get_component_id (line ~54), removed the falsy-module_path fallback so the method now always returns f"{module_path}::{name}", guaranteeing the :: separator is present in the FQDN as required by CODEWIKI-005-2/CODEWIKI-008, matching the suggested fix exactly.
🤖 Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/csharp.py around line 54, review and complete this code-review fix: csharp analyzer generates component IDs without `::` separator when repo_path is empty.
What the draft fix changed: In `TreeSitterCSharpAnalyzer._get_component_id` (line ~54), removed the falsy-`module_path` fallback so the method now always returns `f"{module_path}::{name}"`, guaranteeing the `::` separator is present in the FQDN as required by CODEWIKI-005-2/CODEWIKI-008, matching the suggested fix exactly.
Verify the change is correct and complete; do not refactor unrelated code.
fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer
| return analyzer.nodes, analyzer.call_relationships | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
🦩 🟠 codewiki/src/be/dependency_analyzer/analyzers/csharp#analyze_csharp_file duplicates an existing definition
The analyze_csharp_file module-level function (line ~302) was left unchanged. Extracting a shared implementation would require touching c.py, cpp.py, php.py and creating/aligning a common module across multiple analyzer files, which is out of scope for a single-file fix and risks behavioral drift between per-language analyzers (each has language-specific node handling). No shared module exists yet to import safely, and inventing one here would violate the "every import must exist" rule if not mirrored consistently in the other files, which are not in scope for this change. A complete fix requires a follow-up cross-file refactor introducing a shared analyze_file/dispatch helper module, updating all duplicate call sites simultaneously.
🤖 Prompt for AI agents
In codewiki/src/be/dependency_analyzer/analyzers/csharp.py around line 302, review and complete this code-review fix: codewiki/src/be/dependency_analyzer/analyzers/csharp#analyze_csharp_file duplicates an existing definition.
What the draft fix changed: The `analyze_csharp_file` module-level function (line ~302) was left unchanged. Extracting a shared implementation would require touching `c.py`, `cpp.py`, `php.py` and creating/aligning a common module across multiple analyzer files, which is out of scope for a single-file fix and risks behavioral drift between per-language analyzers (each has language-specific node handling). No shared module exists yet to import safely, and inventing one here would violate the "every import must exist" rule if not mirrored consistently in the other files, which are not in scope for this change. A complete fix requires a follow-up cross-file refactor introducing a shared `analyze_file`/dispatch helper module, updating all duplicate call sites simultaneously.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.
fix confidence: 🔴 30 low — review closely — react 👍/👎 to teach the reviewer
Closes 2 review findings in
codewiki/src/be/dependency_analyzer/analyzers/csharp.py.Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.
::separator when repo_path is emptycodewiki/src/be/dependency_analyzer/analyzers/csharp.py:54codewiki/src/be/dependency_analyzer/analyzers/csharp.py:302What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.
Run: https://product-hub.flamingo.so/admin/code-review
Run id:
35794e5e-98a9-41e6-ac3b-f4c4c16f8e9dMerging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.
ClickUp task: CU-86akn96pk CodeWiki review findings sweep (14 PRs)