Skip to content

refactor: resolve clawpatch findings#27

Merged
Jercik merged 7 commits into
mainfrom
refactor/clawpatch-findings
Jun 15, 2026
Merged

refactor: resolve clawpatch findings#27
Jercik merged 7 commits into
mainfrom
refactor/clawpatch-findings

Conversation

@Jercik

@Jercik Jercik commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Resolves all 7 open clawpatch findings (all low-severity maintainability) and refreshes dependencies. Each finding was revalidated by clawpatch (now openFindings: 0), and the full local suite (format, knip, typecheck, lint, fta, tests) passes via the pre-commit hook on every commit.

Clawpatch fixes

  • docs: consolidate duplicated README command examples — removed the generic single/multi-target and current-worktree example blocks under Manual Mode that were verbatim duplicates of the Examples section; kept the unique detached-HEAD and sibling-directory examples and pointed Manual Mode at Examples.
  • refactor: drop stale executable shebang from cli sourcesrc/cli.ts is compiled to dist/cli.js and run via bin/worktree-remove; it can never run directly (it imports .js paths), so its #!/usr/bin/env -S node --experimental-strip-types shebang and executable bit were misleading. Removed both and converted the action-level process.exit() calls to process.exitCode + return (the idiomatic pattern unicorn/no-process-exit steers toward; the SIGINT handler keeps process.exit(130)). Verified exit codes are unchanged for the no-target, -i non-interactive, --help, and unknown-flag paths.
  • refactor: drop restatement comments and verbose jsdoc — deleted top-of-file comments that only restated module names across src/fs and src/git, plus the verbose normalizeBranchName/exitWithMessage/confirm JSDoc blocks in git-helpers.ts.
  • test: exercise directoryExists against a real temp directory — replaced the fs.stat mock and the toHaveBeenCalledWith implementation assertion with a behavior-level test over a real temp dir/file, so the test no longer locks the helper to its internal fs choice.
  • refactor: thread target names through batch removal resultsreport-batch-results.ts now counts successes instead of collecting names only to count them; remove-batch.ts asserts the non-empty target once after the length guard and pairs each removal result with its target name, removing the impossible ?? "target" / ?? "unknown target" fallbacks.

Dependency update

  • fix(deps): update dependencies — bumped @types/node, fta-check, semantic-release, and oxlint-config-j4k (2.7.2 → 2.7.4) to latest; lockfile deduped. @typescript/native-preview stays on its beta-tagged build (20260421.2) as pinned.
  • test: assert directoryExists returns false directlyoxlint-config-j4k 2.7.4 resolves the contradictory vitest matcher rules (prefer-to-be-falsy vs prefer-strict-boolean-matchers), so the test now uses the precise .toBe(false) instead of the earlier .not.toBe(true) workaround.

One pre-existing eslint-disable on exitWithMessage's process.exit in git-helpers.ts was left untouched — load-bearing and out of scope for these findings.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

@Jercik Jercik merged commit 5b72e94 into main Jun 15, 2026
6 checks passed
@Jercik Jercik deleted the refactor/clawpatch-findings branch June 15, 2026 03:59
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