Skip to content

chore: copyright standardization and optional license fallback - #50

Open
Coding-Dev-Tools wants to merge 11 commits into
masterfrom
sync/copyright-and-license-fallback
Open

Coding-Dev-Tools wants to merge 11 commits into
masterfrom
sync/copyright-and-license-fallback

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Standardizes copyright holder to Coding-Dev-Tools and ensures optional license dependency fallback.

DevForge Engineer and others added 11 commits July 8, 2026 01:34
…s Revenue Holdings / stale 2026 year); W-directed fleet-wide pass
…d-code scan

Named (`export { X } from './mod'`), renamed (`export { X as Y }`),
type (`export { type X }`), and star (`export * from './mod'`) re-exports
now mark the forwarded symbols as used, so barrel/index files no longer
produce false-positive 'unused_export' findings flagged removable=True
(which could delete live public API). Resolves `export *` specifiers to
scanned files (incl. directory index.*). Adds TestReexportForwarding
(8 cases) + removes a pre-existing F841 unused var. 113 tests pass, ruff clean.
… mixed default+named imports, and correct group-index reversal

- Rewrote _IMPORT_PATTERN regex to handle: import type {Foo}, import Default, {Named},
  import {type Foo}, and import Foo as Bar forms
- Fixed _parse_imports group-number reversal (group 1 = named imports block, group 2 = default)
- Strips 'type ' prefix from named import entries in both named-block positions
- All 113 existing tests pass; ruff clean
…code

# Conflicts:
#	CHANGELOG.md
#	src/deadcode/scanner.py
#	tests/test_scanner.py
…fect imports as whole-module consumption

A namespace binding (import * as Utils from './utils') or a bare side-effect
import (import './polyfill') consumes the target module's entire export
surface. The scanner previously ignored both forms entirely, so exports used
ONLY through them were falsely reported as unused with removable=True — live
code queued for deletion by 'deadcode remove'. Both now resolve like barrel
star-reexports: the resolved module's exports are treated as used. Bare
package specifiers stay unresolvable and keep flagging.

+5 regression tests (namespace, export * as ns, side-effect, bare-specifier,
no-consumer control). Full suite: 121 passed, ruff clean.
The previous commit (2ef1848) was built from a stale temp index and
accidentally recorded deletions of 34 unrelated tracked files. This commit
restores the full tree of 30e09bb while keeping the intended scanner fix
(namespace/side-effect imports as whole-module consumption) and its 5
regression tests. No force-push used.
…heckout-index

efa7ce2 restored the tree but its checkout-index step reverted
src/deadcode/scanner.py to the pre-fix version. This commit re-applies the
scanner fix from 2ef1848: import * as NS / bare side-effect imports consume
the target module's whole export surface (resolves like barrel star-reexports).

Final tree vs master-base 30e09bb = exactly scanner.py fix + 5-test file.
…s whole export surface (previously invisible -> exports used only via lazy loading flagged removable=True); +3 regression tests
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

🤖 Automated Code Review

✅ Ruff Lint — No issues

⚠️ Ruff Format — Formatting needed

unformatted: File would be reformatted
 --> src/deadcode/__main__.py:2:1
  |
1 | """Allow running deadcode as: python -m deadcode"""
2 +
3 | from .cli import cli
  |

unformatted: File would be reformatted
   --> src/deadcode/cli.py:66:15
    |
65  | @click.option("--project", "-p", default=".", help="Project directory to scan")
66  + @click.option("--ignore", "-i", multiple=True, help="Additional ignore patterns (gitignore-style)")
67  | @click.option(
    -     "--ignore", "-i", multiple=True, help="Additional ignore patterns (gitignore-style)"
    - )
    - @click.option(
68  |     "--include",
--------------------------------------------------------------------------------
73  | @click.pass_context
    - def cli(
    -     ctx: click.Context, project: str, ignore: tuple[str, ...], include: tuple[str, ...]
    - ) -> None:
74  + def cli(ctx: click.Context, project: str, ignore: tuple[str, ...], include: tuple[str, ...]) -> None:
75  |     """DeadCode — Find and remove dead code in TS/React/Next.js projects.
--------------------------------------------------------------------------------
112 | @cli.command()
    - @click.option(
    -     "--json-output", "-j", is_flag=True, help="Alias for --format=json (deprecated)"
    - )

✅ Secret Detection — Clean

✅ Large Files — Within limits

📊 Diff Stats — 2 file(s) changed

 src/deadcode/scanner.py                    |  46 ++++++++++--
 tests/test_namespace_sideeffect_imports.py | 111 +++++++++++++++++++++++++++++
 2 files changed, 153 insertions(+), 4 deletions(-)

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

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

This branch has not been deployed

No deployments
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