Skip to content

Commit 0ea294e

Browse files
committed
feat(miner): add .cs to READABLE_EXTENSIONS for C# project support
1 parent fdfaf01 commit 0ea294e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

mempalace/miner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
".csv",
5454
".sql",
5555
".toml",
56+
".cs"
5657
}
5758

5859
SKIP_FILENAMES = {

tests/test_miner.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,3 +761,16 @@ def test_mine_does_not_remove_other_processes_pid_file(tmp_path):
761761

762762
assert pid_file.exists(), "Foreign PID entries must not be removed"
763763
assert pid_file.read_text().strip() == str(other_pid)
764+
765+
766+
def test_scan_project_picks_up_cs_files():
767+
"""C# source files (.cs) should be included in READABLE_EXTENSIONS and scanned."""
768+
tmpdir = tempfile.mkdtemp()
769+
try:
770+
project_root = Path(tmpdir).resolve()
771+
772+
write_file(project_root / "Program.cs", "namespace App { class Program {} }\n" * 20)
773+
774+
assert scanned_files(project_root, respect_gitignore=False) == ["Program.cs"]
775+
finally:
776+
shutil.rmtree(tmpdir)

0 commit comments

Comments
 (0)