Skip to content

feat: add --require-license strict mode flag#42

Closed
Coding-Dev-Tools wants to merge 1 commit into
masterfrom
improve/deadcode-require-license-20260629
Closed

feat: add --require-license strict mode flag#42
Coding-Dev-Tools wants to merge 1 commit into
masterfrom
improve/deadcode-require-license-20260629

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

feat: add --require-license strict mode flag

Closes #35

Changes

  • Added --require-license flag to the main CLI group
  • Supported REVENUEHOLDINGS_REQUIRE_LICENSE=1 environment variable
  • When set and revenueholdings-license is not installed: exits with a clear error message
  • When set and license check fails: propagates the error

Usage

# Exit with error if license not installed
deadcode --require-license <command>

# Or via env var
REVENUEHOLDINGS_REQUIRE_LICENSE=1 deadcode <command>

Acceptance Criteria

  • --require-license flag added to main CLI group
  • REVENUEHOLDINGS_REQUIRE_LICENSE env var supported
  • When set and package not installed: exit with clear error
  • When set and license check fails: propagate the error
  • Documented in README (follow-up)

Generated by Claude Code

@github-actions

Copy link
Copy Markdown

🤖 Automated Code Review

✅ Ruff Lint — No issues

⚠️ Ruff Format — Formatting needed

Would reformat: src/deadcode/__main__.py
Would reformat: src/deadcode/cli.py
Would reformat: src/deadcode/scanner.py
Would reformat: tests/test_cli_edge_cases.py
Would reformat: tests/test_config_and_fixes.py
Would reformat: tests/test_scanner.py
6 files would be reformatted, 3 files already formatted

✅ Secret Detection — Clean

✅ Large Files — Within limits

📊 Diff Stats — 1 file(s) changed

 src/deadcode/cli.py | 47 ++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 42 insertions(+), 5 deletions(-)

Verdict: ⚠️ Warnings — Lint/format issues found. Recommend fixing before merge.

Automated by Coding-Dev-Tools/.github reusable workflow.

Copy link
Copy Markdown
Owner Author

Closing this PR — the deadcode project has explicitly removed the revenueholdings_license dependency and the test suite (TestLicenseDepRemoved) asserts that revenueholdings_license is NOT referenced in the code or pyproject.toml. Adding the --require-license flag here would break those existing tests. The feature should not be added to this repo.


Generated by Claude Code

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.

feat: add --require-license strict mode flag

1 participant