Skip to content

Add configurable analyze output and git-skip options#4

Closed
sonii-shivansh wants to merge 1 commit into
mainfrom
codex/add-new-features
Closed

Add configurable analyze output and git-skip options#4
sonii-shivansh wants to merge 1 commit into
mainfrom
codex/add-new-features

Conversation

@sonii-shivansh

Copy link
Copy Markdown
Owner

Motivation

  • Provide users more control over analyze runs for large or non-git repositories and custom report locations.
  • Allow temporarily overriding hotspot counts without changing config files.
  • Ensure AI insights are colocated with the chosen report output for convenience.

Description

  • Add new CLI flags to analyze: --skip-git to bypass git history analysis, --hotspots <n> to override hotspot count, and --output <path> to set the HTML report path, implemented in ImprovedAnalyzeCommand.
  • Validate --hotspots to fail fast when non-positive values are provided and use the override when present via hotspotLimit.
  • Compute reportFile from --output when provided and create parent directories as needed, and write ai-insights.md next to the chosen report file.
  • Document the new flags and usage examples in README.md.

Testing

  • Ran ./gradlew test in this environment and it failed due to the CI environment lacking a Java 21 toolchain (toolchain download not configured), so unit tests could not complete.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 899080a948

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +49 to +51
if (hotspotLimitOverride != null && hotspotLimitOverride!! <= 0) {
echo("❌ Error: --hotspots must be greater than 0")
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return non-zero on invalid --hotspots value

When --hotspots is 0 or negative, this branch only prints an error and returns from run(), which still exits the CLI process successfully. In automation (scripts/CI), that makes an invalid invocation look like a successful analysis run, so downstream steps may proceed using stale or missing outputs. This validation should fail the command with a non-zero exit (for example via a Clikt usage error) instead of a normal return.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant