Skip to content
Closed
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2026-05-18

### Added
- `__main__.py` module for `python -m deadcode` support

### Fixed
- CLI no longer fails when invoked via `python -m deadcode`

## [0.1.0] - 2025-05-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deadcode-cli",
"version": "0.1.0",
"description": "Find unused/dead code in Python projects. Static analysis tool to identify orphaned functions, classes, and imports.",
"description": "Detect and remove unused exports, dead routes, orphaned CSS, and unreferenced components in TypeScript/React/Next.js projects.",
"author": "Revenue Holdings <engineering@revenueholdings.dev>",
"license": "MIT",
"repository": {
Expand Down
5 changes: 5 additions & 0 deletions src/deadcode/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""DeadCode CLI entry point for `python -m deadcode`."""
from .cli import cli

if __name__ == "__main__":
cli()
6 changes: 3 additions & 3 deletions tests/test_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ def test_scan_json_output(self, runner, sample_project):
def test_scan_category_filter(self, runner, sample_project):
result = runner.invoke(cli, ["-p", str(sample_project), "scan", "-c", "orphaned_css"])
assert result.exit_code == 0
json.loads(result.output) if "--json-output" in [] else None
# Just check it doesn't crash
assert "Orphaned CSS" in result.output or result.exit_code == 0
# Should only show orphaned CSS findings
assert "Orphaned CSS" in result.output
assert "Unused Exports" not in result.output

def test_scan_nonexistent_dir(self, runner):
result = runner.invoke(cli, ["-p", "/nonexistent/path", "scan"])
Expand Down
Loading