-
Notifications
You must be signed in to change notification settings - Fork 0
11 use the return of the test function and render it to the user properly #26
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
11 use the return of the test function and render it to the user properly #26
Conversation
Signed-off-by: dfayd <78728332+dfayd0@users.noreply.github.com>
Signed-off-by: dfayd <78728332+dfayd0@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements proper handling and rendering of test execution results from LeetCode's API. The changes enhance the user experience by providing formatted, colored output instead of raw debug information.
- Added a new result formatter module to render test results with colored output and proper formatting
- Integrated local compilation checks and code preprocessing before sending to LeetCode
- Temporarily disabled some test functions (commented out) that were likely causing issues
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/result_formatter.rs |
New module that formats test execution results with colors and structured output |
src/leetcode_api_runner.rs |
Updated test function to use local checks, code preprocessing, and proper result formatting |
src/utils.rs |
Added code preprocessing functions and local compilation check functionality |
src/lib.rs |
Added the new result_formatter module to the library exports |
tests/local_config_tests.rs |
Commented out two test functions that were presumably failing |
Comments suppressed due to low confidence (1)
src/utils.rs:170
- The result of
run_local_checkis ignored withlet _, but this function can return compilation errors that should be handled. Consider checking the result and either displaying warnings or failing early if compilation fails.
};
src/result_formatter.rs
Outdated
| _ => "Unknown Status".yellow().to_string(), | ||
| } | ||
| } | ||
| // Status with icon |
Copilot
AI
Aug 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This trailing comment appears incomplete or leftover from development. Consider removing it or completing the thought.
| // Status with icon |
| // if let Some(run_success) = result.run_success { | ||
| // let success_text = if run_success { "Yes".green() } else { "No".red() | ||
| // }; output.push_str(&format!("> Execution Success: {}\n", | ||
| // success_text)); } |
Copilot
AI
Aug 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This large block of commented code (lines 20-24) should be removed if it's no longer needed, or converted to a TODO comment if it represents planned functionality.
| // success_text)); } |
Signed-off-by: dfayd <78728332+dfayd0@users.noreply.github.com>
No description provided.