Add configurable analyze output and git-skip options#4
Conversation
There was a problem hiding this comment.
💡 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".
| if (hotspotLimitOverride != null && hotspotLimitOverride!! <= 0) { | ||
| echo("❌ Error: --hotspots must be greater than 0") | ||
| return |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
analyzeruns for large or non-git repositories and custom report locations.Description
analyze:--skip-gitto bypass git history analysis,--hotspots <n>to override hotspot count, and--output <path>to set the HTML report path, implemented inImprovedAnalyzeCommand.--hotspotsto fail fast when non-positive values are provided and use the override when present viahotspotLimit.reportFilefrom--outputwhen provided and create parent directories as needed, and writeai-insights.mdnext to the chosen report file.README.md.Testing
./gradlew testin 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