Skip to content

Fix/csharp source exts#42

Merged
mvoutov merged 3 commits intomainfrom
fix/csharp-source-exts
Apr 17, 2026
Merged

Fix/csharp source exts#42
mvoutov merged 3 commits intomainfrom
fix/csharp-source-exts

Conversation

@mvoutov
Copy link
Copy Markdown
Contributor

@mvoutov mvoutov commented Apr 17, 2026

What

Why

Closes #

How I tested

  • npm test passes
  • Tested against a real repo:
  • --dry-run output looks correct (if applicable)

Checklist

  • Changes are focused on a single feature or fix
  • Tests added or updated for any logic changes
  • No new dependencies added (or justified in the PR description)

Summary by CodeRabbit

  • New Features

    • Extended language support to C#, Java, Kotlin, Swift, PHP, Elixir, and F# for domain discovery.
  • Bug Fixes

    • Improved repository scanning by excluding build output directories from size estimation and domain detection.
  • Documentation

    • Updated changelog and documentation to reflect new language support and scanning improvements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@mvoutov has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 0 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 0 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b534e8e-74ce-44e4-9e63-1a931ab7e991

📥 Commits

Reviewing files that changed from the base of the PR and between 0841327 and 8ae4147.

📒 Files selected for processing (9)
  • .agents/skills/repo-scanning/SKILL.md
  • .claude/skills/repo-scanning/skill.md
  • CHANGELOG.md
  • package.json
  • src/lib/context-builder.js
  • src/lib/impact.js
  • src/lib/scanner.js
  • src/lib/source-exts.js
  • tests/scanner.test.js

Walkthrough

Version 0.7.1 release extends the repository scanner to recognize additional programming language file extensions (C#, Java, Kotlin, Swift, PHP, Elixir, F#), skips build artifact directories (bin, obj, target) during scanning and size estimation, and updates documentation and tests accordingly.

Changes

Cohort / File(s) Summary
Version & Documentation
package.json, CHANGELOG.md, AGENTS.md, .agents/skills/architecture/references/code-map.md
Version bumped to 0.7.1; release notes document expanded language support and build directory skipping; dependency/hotspot metrics updated.
Skill Documentation
.agents/skills/repo-scanning/SKILL.md, .claude/skills/repo-scanning/skill.md
Updated domain discovery rules to include build directories (bin, obj, target) and extended SOURCE_EXTS list to cover additional language ecosystems; clarified import-graph/hub/cluster detection remains JS/TS/Python-only.
Core Scanner Logic
src/lib/scanner.js
Extended SOURCE_EXTS to include .mjs, .cjs, .java, .kt, .kts, .cs, .fs, .fsx, .swift, .php, .ex, .exs; added bin, obj, target to skip lists for domain detection and size estimation.
Scanner Tests
tests/scanner.test.js
Added three new test fixtures validating domain detection for C#, Java, Swift, PHP, Elixir, Kotlin source files; confirmed build directories are skipped during scanning.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • aspenkit/aspens#36: Modifies repo-scanning logic and scanner tests in parallel to support multi-target and codex-aware scanning features.
🚥 Pre-merge checks | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning Description is incomplete. All template sections are empty placeholders with no actual content about what changed, why, or testing performed. The issue reference is missing. Fill in the What, Why, and How I tested sections with concrete details about the multi-language support additions, build directory exclusions, and test results.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Title is vague and misleading. 'Fix/csharp source exts' does not clearly convey the full scope of changes, which include support for multiple new languages (Java, Kotlin, C#, F#, Swift, PHP, Elixir), build directory skipping, and version bump to 0.7.1. Use a more descriptive title such as 'Add support for C#, Java, Kotlin, and other language file extensions' or 'Expand scanner to recognize additional build directories and language file types'.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/csharp-source-exts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/lib/scanner.js (1)

83-86: Skip list in estimateRepoSize duplicates SKIP_DIR_NAMES logic.

The entry === 'x' || entry === 'y' || ... chain and SKIP_DIR_NAMES now largely overlap (both skip bin/obj/target/node_modules/etc.). Optional: consolidate both call sites to reference a shared Set to prevent the two lists from drifting on the next language addition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/scanner.js` around lines 83 - 86, The skip-list in estimateRepoSize
duplicates the hardcoded chain of directory names; replace the inline condition
with a lookup against the existing SKIP_DIR_NAMES set (used elsewhere) so both
call sites share one source of truth: in the function estimateRepoSize, remove
the long "entry === 'x' || ..." chain and instead check
SKIP_DIR_NAMES.has(entry) (or similar) to skip entries; ensure SKIP_DIR_NAMES is
imported/available in that module and preserve the existing behavior for entries
starting with '.' by combining that check with the set lookup.
tests/scanner.test.js (1)

221-236: Consider also asserting the language detections here.

The fixture exercises Java/Swift/PHP/Elixir/Kotlin source-file presence, but doesn't drop any marker file (e.g., pom.xml, Package.swift, composer.json, mix.exs, build.gradle.kts). detectLanguages is marker-based, so scan.languages will be empty here. The test still validates domain behavior correctly, but adding one marker + a toContain assertion would catch regressions in detectLanguages alongside detectDomains.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/scanner.test.js` around lines 221 - 236, The test currently creates
source files but no language marker files so detectLanguages (and thus
scan.languages) stays empty; update the fixture created via createFixture in the
test case to include at least one marker file per language (e.g., add 'pom.xml'
for Java, 'Package.swift' for Swift, 'composer.json' for PHP, 'mix.exs' for
Elixir, 'build.gradle.kts' for Kotlin) and then add assertions against
scan.languages (e.g., expect(scan.languages).toContain('java'), etc.) to verify
detectLanguages works alongside domain detection when using scanRepo and
detectLanguages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Around line 5-12: The changelog entry for version header "[0.7.1] -
2026-04-16" conflicts with the skill files' "Last Updated" date of 2026-04-17;
pick a single canonical date and make them consistent—either update the
CHANGELOG header "[0.7.1] - 2026-04-16" to 2026-04-17 or update the skill files'
"Last Updated" to 2026-04-16 so both match; ensure you change all occurrences
(the version header in CHANGELOG.md and any "Last Updated" fields in the skill
files) to the chosen date.

In `@src/lib/scanner.js`:
- Around line 635-643: context-builder.js currently defines a SOURCE_EXTS list
that is out of sync with scanner.js (scanner.js added .mjs, .cjs, .kts, .cs,
.fs, .fsx), causing files the scanner accepts to be ignored during domain
context building; update context-builder.js to include the missing extensions or
better yet extract a single shared constant used by both modules (e.g., move
SOURCE_EXTS into a new shared module and import it from scanner.js and
context-builder.js) so the set used by SOURCE_EXTS in context-builder.js matches
the scanner.js definition and prevents silent omissions downstream.

---

Nitpick comments:
In `@src/lib/scanner.js`:
- Around line 83-86: The skip-list in estimateRepoSize duplicates the hardcoded
chain of directory names; replace the inline condition with a lookup against the
existing SKIP_DIR_NAMES set (used elsewhere) so both call sites share one source
of truth: in the function estimateRepoSize, remove the long "entry === 'x' ||
..." chain and instead check SKIP_DIR_NAMES.has(entry) (or similar) to skip
entries; ensure SKIP_DIR_NAMES is imported/available in that module and preserve
the existing behavior for entries starting with '.' by combining that check with
the set lookup.

In `@tests/scanner.test.js`:
- Around line 221-236: The test currently creates source files but no language
marker files so detectLanguages (and thus scan.languages) stays empty; update
the fixture created via createFixture in the test case to include at least one
marker file per language (e.g., add 'pom.xml' for Java, 'Package.swift' for
Swift, 'composer.json' for PHP, 'mix.exs' for Elixir, 'build.gradle.kts' for
Kotlin) and then add assertions against scan.languages (e.g.,
expect(scan.languages).toContain('java'), etc.) to verify detectLanguages works
alongside domain detection when using scanRepo and detectLanguages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 53f40792-2f6f-4bba-a222-b4afc6734b27

📥 Commits

Reviewing files that changed from the base of the PR and between 9251641 and 0841327.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .agents/skills/architecture/references/code-map.md
  • .agents/skills/repo-scanning/SKILL.md
  • .claude/skills/repo-scanning/skill.md
  • AGENTS.md
  • CHANGELOG.md
  • package.json
  • src/lib/scanner.js
  • tests/scanner.test.js

Comment thread CHANGELOG.md
Comment on lines +5 to +12
## [0.7.1] - 2026-04-16

### Fixed
- **Domain discovery for C#, Java, Kotlin, Swift, PHP, Elixir, F#** — scanner's `SOURCE_EXTS` only recognized JS/TS/Python/Ruby/Go/Rust files, so `doc init` reported zero domains for projects in other languages even when language detection itself succeeded. Added `.cs`, `.java`, `.kt`, `.kts`, `.swift`, `.php`, `.ex`, `.exs`, `.fs`, `.fsx`, `.mjs`, and `.cjs` to the source-extension set.
- **Build-output skipping** — repo-size estimation and domain detection now skip `bin/`, `obj/`, and `target/` directories, preventing .NET / Java / Rust build artifacts from polluting module lists or line counts.

### Known Limitations
- Import graph, hub files, and cluster detection remain JS/TS/Python-only — `doc init` on C#/Java/Swift/PHP/Elixir/Kotlin/Rust/Go/Ruby projects will generate skills and domains but produce a minimal atlas. Full multi-language import parsing is tracked for a future release.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor date drift.

Release date here is 2026-04-16 but the skill files' Last Updated is 2026-04-17. Pick one to avoid confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 5 - 12, The changelog entry for version header
"[0.7.1] - 2026-04-16" conflicts with the skill files' "Last Updated" date of
2026-04-17; pick a single canonical date and make them consistent—either update
the CHANGELOG header "[0.7.1] - 2026-04-16" to 2026-04-17 or update the skill
files' "Last Updated" to 2026-04-16 so both match; ensure you change all
occurrences (the version header in CHANGELOG.md and any "Last Updated" fields in
the skill files) to the chosen date.

Comment thread src/lib/scanner.js Outdated
@mvoutov mvoutov merged commit e427106 into main Apr 17, 2026
3 checks passed
@mvoutov mvoutov deleted the fix/csharp-source-exts branch April 17, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant