Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mempalace/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
".csv",
".sql",
".toml",
".cs"
}

SKIP_FILENAMES = {
Expand Down
13 changes: 13 additions & 0 deletions tests/test_miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,3 +761,16 @@ def test_mine_does_not_remove_other_processes_pid_file(tmp_path):

assert pid_file.exists(), "Foreign PID entries must not be removed"
assert pid_file.read_text().strip() == str(other_pid)


def test_scan_project_picks_up_cs_files():
"""C# source files (.cs) should be included in READABLE_EXTENSIONS and scanned."""
tmpdir = tempfile.mkdtemp()
try:
project_root = Path(tmpdir).resolve()

write_file(project_root / "Program.cs", "namespace App { class Program {} }\n" * 20)

assert scanned_files(project_root, respect_gitignore=False) == ["Program.cs"]
finally:
shutil.rmtree(tmpdir)