-
Notifications
You must be signed in to change notification settings - Fork 2
Add granular exit codes for different error types #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Define exit code constants (0-4) in cli.ts - Exit code 0: Success, no URLs found - Exit code 1: URLs found (when --fail-on-error) - Exit code 2: Configuration error - Exit code 3: File read error - Exit code 4: Parse error threshold (reserved) - Update error handling to use appropriate exit codes - Add comprehensive exit code tests - Update README.md with exit codes documentation Co-authored-by: bingenito <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
===========================================
+ Coverage 49.89% 68.89% +19.00%
===========================================
Files 9 9
Lines 487 508 +21
Branches 107 116 +9
===========================================
+ Hits 243 350 +107
+ Misses 244 158 -86
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/allowdco |
|
@copilot While exitCodes.test.ts tests the new exit codes, the coverage of cli.js remains 0. Identify and resolve issues with coverage of any tests for cli.js not being measured. |
- Extract CLI action logic into testable runCLI function - Add CLIOptions interface for type safety - Create cli.test.ts with unit tests for runCLI function - Achieve 73% code coverage for cli.ts (was 0%) - Keep exitCodes.test.ts for integration testing - All 100 tests pass Co-authored-by: bingenito <[email protected]>
Fixed in commit 3cef41b. The issue was that Solution:
Results:
The coverage report now shows: |
Implementation Plan: Add Granular Exit Codes
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.