-
Notifications
You must be signed in to change notification settings - Fork 0
Improve Tests and code base #32
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
Merged
Merged
Conversation
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
…dling - Added input validation for repository paths in CodeQLAnalysisUseCase. - Improved error messages for invalid SARIF file uploads in SarifUploadUseCase. - Updated CodeQLInstaller to validate installation directory. - Refactored CodeQLRunner to include customizable command timeout. - Documented DirectoryManager's current test-only status. - Added is_git_repository method to GitUtils for repository checks. - Cleaned up LanguageDetector by removing redundant methods. - Fixed logger documentation to accurately reflect application context.
…er, and logging - Updated `TestCodeQLAnalysisUseCase` to improve path validation and exception handling during execution. - Added tests for handling empty directories and hidden directories in monorepo analysis. - Enhanced `TestCodeQLInstaller` with additional checks for installation status and version retrieval. - Refined `TestCodeQLRunner` to include timeout handling and improved database analysis tests. - Improved `TestDirectoryManager` to handle Git command errors and ensure proper initialization state. - Expanded `TestGitUtils` to gracefully handle invalid paths and subprocess exceptions. - Cleaned up `TestLanguageDetector` by removing redundant tests and focusing on essential functionality. - Added comprehensive tests for `SarifUploadUseCase`, including request validation and upload failure handling. - Introduced a new test suite for the logger infrastructure, ensuring proper logging behavior and configuration.
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 enhances test coverage and refines core infrastructure for more robust validation, error handling, and configurability.
- Adds missing-field and error-path validation tests for SARIF uploads
- Refactors code to remove deprecated methods, enforce timeouts, and reorganize private/public methods
- Updates CoreCLI runner and installer with configurable timeouts and stricter input validation
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sarif_upload_use_case.py | Added tests for missing fields and invalid SARIF file handling |
| src/codeql_wrapper/domain/use_cases/sarif_upload_use_case.py | Introduced request validation and timeout handling for uploads |
| src/codeql_wrapper/infrastructure/codeql_runner.py | Made _run_command private, added timeout parameter and use |
| tests/test_codeql_analysis.py | Expanded tests for request validation and exception flows |
| src/codeql_wrapper/infrastructure/logger.py | Updated module docstring to reflect CodeQL wrapper context |
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.