Skip to content

Conversation

fernandosantos-br
Copy link
Collaborator

…for database creation and analysis

@Copilot Copilot AI review requested due to automatic review settings July 14, 2025 16:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors CodeQLRunner to remove the repository_path parameter from database creation and introduce a new sarif_category parameter for analysis.

  • Remove repository_path and its SARIF category logic from create_database.
  • Add sarif_category parameter and related CLI flag handling to analyze_database.
  • Update create_and_analyze to pass the old repository_path value into sarif_category for the analysis step.
Comments suppressed due to low confidence (3)

src/codeql_wrapper/infrastructure/codeql_runner.py:80

  • The removal of repository_path from create_database changes its public signature. Make sure to update any external callers and document this breaking change in the changelog or release notes.
        build_mode: Optional[str] = None,

src/codeql_wrapper/infrastructure/codeql_runner.py:152

  • Consider adding unit tests to verify that the --sarif-category flag is correctly appended when sarif_category is provided to analyze_database.
        if sarif_category:

src/codeql_wrapper/infrastructure/codeql_runner.py:249

  • [nitpick] Passing repository_path as sarif_category may be confusing due to parameter naming mismatch. Consider renaming the local variable or explicitly mapping it to clarify intent.
                sarif_category=repository_path,

@fernandosantos-br fernandosantos-br merged commit 0683593 into main Jul 14, 2025
7 checks passed
@fernandosantos-br fernandosantos-br deleted the develop-fix-sarif branch July 15, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants