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.
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 |
There was a problem hiding this comment.
This trailing comment appears incomplete or leftover from development. Consider removing it or completing the thought.
Suggested change
| // 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)); } |
There was a problem hiding this comment.
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.
Suggested change
| // success_text)); } |
Signed-off-by: dfayd <78728332+dfayd0@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.