Skip to content

chore(deadcode): add misc changes#43

Merged
Coding-Dev-Tools merged 9 commits into
masterfrom
cowork/improve-deadcode
Jul 3, 2026
Merged

chore(deadcode): add misc changes#43
Coding-Dev-Tools merged 9 commits into
masterfrom
cowork/improve-deadcode

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Changes

Automated submission of local changes.

Commits

  • e5fb25b chore(deadcode): add misc
  • 91459da cowork-bot: fix export-list comment masking + repair broken CLI subprocess tests
  • c46eabc cowork-bot: resolve merge conflict in tests/test_scanner.py (keep both TestMultiLineExportList and master test suites)
  • d3317e5 cowork-bot: seed cowork-auto-pr workflow for auto PR creation
  • 7f02726 cowork-bot: fix multi-line export list detection + 4 regression tests
  • 4ecfb0a chore: update package version
  • 0785e67 fix: remove dead revenueholdings-license optional dependency

Branch: cowork/improve-deadcode -> master

Coding-Dev-Tools and others added 8 commits May 26, 2026 15:23
scanner.py: _EXPORT_LIST_PATTERN was applied line-by-line, so multi-line
export blocks like:

    export {
      Foo,
      Bar,
    }

were silently missed — Foo and Bar were never added to the exports map
and thus never flagged as unused exports (false negatives).

Fix: apply _EXPORT_LIST_PATTERN to the full file content (re.DOTALL added
for clarity; [^}] already matched newlines). Line number computed via
content.count('\n', 0, m.start()) + 1 so findings still point to the
opening 'export {' line. Single-line export { Foo, Bar } behaviour is
unchanged.

Add TestMultiLineExportList (4 tests) covering: multi-line detection,
used-name suppression, alias handling, single-line regression.
…h TestMultiLineExportList and master test suites)
…ocess tests

- Strip // comments from multi-line export lists so exports after commented
  entries are no longer silently missed (_parse_exports in scanner.py).
- Replace sys.executable subprocess probes in test_cli_edge_cases.py with
  CliRunner so the suite passes regardless of editable-install state.
- Add regression test for inline comments inside export { } blocks.
Automated batch commit.

Files changed:
  M package.json
@Coding-Dev-Tools

Copy link
Copy Markdown
Owner Author

[Blocked — code conflict] Conflicts with master in src/deadcode/scanner.py, tests/test_scanner.py, tests/test_cli_edge_cases.py, and package.json — overlapping logic/tests already on master (note #45 was just merged). Auto-resolving risks silently dropping behavior, so leaving for a manual rebase.

@Coding-Dev-Tools Coding-Dev-Tools merged commit afa69fa into master Jul 3, 2026
@Coding-Dev-Tools Coding-Dev-Tools deleted the cowork/improve-deadcode branch July 3, 2026 23:41
@github-actions

github-actions Bot commented Jul 3, 2026

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 — 0 file(s) changed


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

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

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