Skip to content

Conversation

Perdiga
Copy link
Collaborator

@Perdiga Perdiga commented Jul 8, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 8, 2025 23:43
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

This PR enhances logging output and CLI formatting by replacing emoji prefixes with styled text labels, introducing a custom log formatter, and adding monorepo support.

  • Introduce ShortNameFormatter for concise logger names and configure colored output via colorama.
  • Replace emoji prefixes in CLI commands with click.style colored labels (e.g., SUCCESS:, ERROR:, WARNING:).
  • Add monorepo flag to CodeQLAnalysisRequest, use case logic, and CLI invocation.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_cli.py Updated assertions to expect styled text labels instead of emojis for CLI output.
src/codeql_wrapper/infrastructure/logger.py Added ShortNameFormatter and updated logger configuration to use the custom formatter.
src/codeql_wrapper/domain/use_cases/codeql_analysis_use_case.py Implemented monorepo analysis logic in CodeQLAnalysisUseCase.
src/codeql_wrapper/domain/entities/codeql_analysis.py Added monorepo attribute to CodeQLAnalysisRequest.
src/codeql_wrapper/cli.py Initialized colorama, replaced emoji outputs with click.style labels, and passed monorepo.
pyproject.toml Bumped version to 0.1.4 and added colorama dependency.
SECURITY.md Added security issue reporting guidelines.
LICENSE Updated copyright holder.
Comments suppressed due to low confidence (3)

src/codeql_wrapper/infrastructure/logger.py:9

  • [nitpick] The docstring mentions "class name" but the formatter actually shortens the logger name (module path). Update the description to refer to the "logger name" for clarity.
    """Custom formatter that shows only the class name instead of full module path."""

tests/test_cli.py:1

  • [nitpick] Monorepo support was added to the CLI but there are no tests for the new --monorepo flag. Consider adding tests that invoke analyze --monorepo and verify the monorepo logic.
"""Tests for the CLI module."""

tests/test_cli.py:144

  • Tests assert plain "SUCCESS:" text, but click.style wraps it with ANSI color codes. As written, the substring may not match. Consider stripping ANSI codes in result.output or disabling color output in tests (e.g., CliRunner(color=False)).
        assert "SUCCESS: CodeQL 2.22.1 installed successfully!" in result.output

output_directory=Path(output_dir) if output_dir else None,
verbose=verbose,
force_install=force_install,
monorepo=monorepo,
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

The analyze command passes monorepo=monorepo, but no --monorepo option is defined in the Click decorator. This will cause a NameError. Add a @click.option('--monorepo', is_flag=True, help='Enable monorepo analysis') above the analyze definition.

Copilot uses AI. Check for mistakes.

@Perdiga Perdiga merged commit cb1dabf into main Jul 8, 2025
7 checks passed
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.

3 participants