hydrojudge: fix checker message#1185
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughIn Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/hydrojudge/src/judge/default.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/hydrojudge/src/checkers.ts`:
- Around line 264-268: The if statement checking for code === 9 needs proper
block formatting to satisfy the linter. Add an opening brace after the if
condition and wrap the return statement inside braces, ensuring the object
literal is properly contained within the if block body rather than appearing
inline with the return keyword. This will resolve the "Expected { after 'if'
condition" compilation error and allow the checker to compile cleanly.
In `@packages/hydrojudge/src/judge/default.ts`:
- Around line 66-69: The multi-pass prefix logic in the runtime error handling
for STATUS.STATUS_RUNTIME_ERROR only applies when message is a string, but skips
the case when message is an object (for non-signalled errors). Modify the
conditional check that appends the pass prefix to handle both cases: when
message is a string, prepend the prefix directly, and when message is an object
with a message property, prepend the prefix to the message property within the
object. Ensure the mp.i check still guards the overall logic but apply the
prefix appropriately based on the message type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d7802ea1-c805-47ed-bf13-238947e42410
📒 Files selected for processing (2)
packages/hydrojudge/src/checkers.tspackages/hydrojudge/src/judge/default.ts
Summary by CodeRabbit