Skip to content

Codacy: stdout error listener reports with console.error - #20

Merged
ranjan-mohanty merged 1 commit into
mainfrom
codacy-handlers
Nov 15, 2026
Merged

ranjan-mohanty merged 1 commit into
mainfrom
codacy-handlers

Conversation

@ranjan-mohanty

Copy link
Copy Markdown
Collaborator

Follow-up to #19. Running Codacy's rule locally (ESLint 8 + eslint-plugin-security-node) showed detect-unhandled-event-errors still fires on src/bin.ts: it only accepts error listeners that report with console.error (or reject). The listener now exits 0 on EPIPE and otherwise reports with console.error and exits 1. Same behaviour, and it lints clean.

The other remaining finding (unbound-method in src/report/terminal.ts) no longer fires on current main; Codacy's entry is stale and should clear on the next analysis.

npm run check passes.

🤖 Generated with Claude Code

Validated with ESLint 8 + eslint-plugin-security-node, the rule Codacy runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified. The requested behavior appears to have no reported logic or security issues, though the error branches and lint compliance are not covered by automated tests.

About this PR

  • Add automated regression tests for the quiet EPIPE path and the reported non-EPIPE path, including their exit statuses.

Test suggestions

  • Verify that an EPIPE stdout error exits with status 0 without reporting an error.
  • Verify that a non-EPIPE stdout error is reported with console.error and exits with status 1.
  • Verify the updated listener passes the relevant lint check.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that an EPIPE stdout error exits with status 0 without reporting an error.
2. Verify that a non-EPIPE stdout error is reported with console.error and exits with status 1.
3. Verify the updated listener passes the relevant lint check.

TIP Add a Jira or Linear ticket key to the branch or title so the reviewer can check the PR against it. Using another tracker? Tell us.
TIP How was this review? Give us feedback

@ranjan-mohanty
ranjan-mohanty merged commit a246c67 into main Nov 15, 2026
10 checks passed
@ranjan-mohanty
ranjan-mohanty deleted the codacy-handlers branch November 15, 2026 23:29
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