Skip to content

fix: reduce dead code false positives for Next.js and TS imports#49

Merged
DaisukeYoda merged 3 commits into
mainfrom
fix/deadcode-false-positives-next-ts
Feb 18, 2026
Merged

fix: reduce dead code false positives for Next.js and TS imports#49
DaisukeYoda merged 3 commits into
mainfrom
fix/deadcode-false-positives-next-ts

Conversation

@DaisukeYoda

Copy link
Copy Markdown
Member

Summary

  • resolve alias imports in dead code aggregation to avoid false positives on aliased paths
  • treat Next.js App Router convention exports (for example default and generateMetadata) as framework-consumed
  • improve TypeScript handling for dead-code import detection by recognizing type_identifier and skipping explicit import type lines
  • add regression tests for alias imports, Next.js reserved exports, and TS type-import/type-reference usage

Validation

  • go test ./internal/analyzer
  • go test ./...
  • go run ./cmd/jscan analyze --select deadcode --json ../codescan/src (before: 8 findings, after: 0 findings)

@DaisukeYoda DaisukeYoda self-assigned this Feb 18, 2026
@DaisukeYoda DaisukeYoda merged commit 197d35f into main Feb 18, 2026
3 checks passed
@DaisukeYoda DaisukeYoda deleted the fix/deadcode-false-positives-next-ts branch February 18, 2026 17:45
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