Skip to content

CLI-549 Add sonar integrate antigravity command and install orchestration#407

Merged
nquinquenel merged 3 commits into
masterfrom
feature/nq/CLI-549-add-command-antigravity
Jun 15, 2026
Merged

CLI-549 Add sonar integrate antigravity command and install orchestration#407
nquinquenel merged 3 commits into
masterfrom
feature/nq/CLI-549-add-command-antigravity

Conversation

@nquinquenel

@nquinquenel nquinquenel commented Jun 8, 2026

Copy link
Copy Markdown
Member

Register integrate antigravity in the command tree, add integrateAntigravity() orchestration, register antigravity-cli in ALL_INTEGRATIONS, and CAG.

More to come


Summary by Gitar

  • New Antigravity integration:
    • Registered antigravity command under sonar integrate with support for project and global scopes.
    • Implemented orchestration to configure secrets scanning hooks, Agentic Analysis, and MCP server setup.
  • Configuration & Infrastructure:
    • Added Antigravity configuration constants for local (.agents/) and global (~/.gemini/config) workspaces.
    • Introduced antigravity-cli registry declaration to manage integration lifecycle and context augmentation.
  • Testing:
    • Added comprehensive integration tests covering successful setup, idempotency, global configuration, and flag validation.
    • Included unit tests for resolving installation targets based on scope.

This will update automatically on new commits.

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jun 8, 2026

Copy link
Copy Markdown

CLI-549

Comment thread tests/unit/cli/commands/integrate/antigravity/integrate.test.ts Outdated
Comment thread src/cli/command-tree.ts
@nquinquenel nquinquenel force-pushed the feature/nq/CLI-549-add-command-antigravity branch from b2809b1 to 24c64c2 Compare June 8, 2026 09:50
@nquinquenel nquinquenel marked this pull request as ready for review June 8, 2026 11:47
@nquinquenel nquinquenel force-pushed the feature/nq/CLI-549-add-command-antigravity branch from 24c64c2 to 080e1e8 Compare June 8, 2026 12:06

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! I think it's great to go in small increments. I would suggest to target master branch directly but not declare the new feature in command-tree.

Comment thread src/cli/commands/integrate/antigravity/declaration.ts Outdated
Comment thread src/cli/commands/integrate/antigravity/declaration.ts Outdated
Comment thread src/cli/commands/integrate/antigravity/declaration.ts
Comment thread src/cli/commands/integrate/index.ts Outdated
Comment thread src/cli/command-tree.ts
Comment thread src/lib/config-constants.ts
Comment thread tests/unit/cli/commands/integrate/antigravity/integrate.test.ts Outdated
@nquinquenel nquinquenel force-pushed the feature/nq/CLI-549-add-command-antigravity branch from 080e1e8 to bb62908 Compare June 15, 2026 09:23
@nquinquenel nquinquenel changed the base branch from feature/nq/CLI-548-integrate-antigravity to master June 15, 2026 09:24
@netlify

netlify Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploy Preview for sonarqube-cli canceled.

Name Link
🔨 Latest commit f7edca3
🔍 Latest deploy log https://app.netlify.com/projects/sonarqube-cli/deploys/6a2fc6457bff130008b58675

@sonarqubecloud

sonarqubecloud Bot commented Jun 15, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue
0 New dependency risks

Measures
0 Security Hotspots
87.3% Coverage on New Code
0.0% Duplication on New Code

🛠️ Remediation Agent ready

  • Fix automatically
    Creates a separate PR with fixes for eligible issues

See analysis details on SonarQube Cloud

Comment thread src/cli/command-tree.ts
@nquinquenel nquinquenel merged commit baef115 into master Jun 15, 2026
32 of 33 checks passed
@nquinquenel nquinquenel deleted the feature/nq/CLI-549-add-command-antigravity branch June 15, 2026 11:38
@gitar-bot

gitar-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 3 resolved / 3 findings

Integrates the 'antigravity' command into the CLI and orchestrates its configuration, resolving the UTF-8 BOM issue in the pre-commit dependency file. No further issues found.

✅ 3 resolved
Quality: New file git-pre-commit-dependency-risks.ts starts with a UTF-8 BOM

📄 src/cli/commands/hook/git-pre-commit-dependency-risks.ts:1
The new source file begins with a UTF-8 byte-order mark (U+FEFF) immediately before the /* license header (visible as the stray character on line 1). Every other .ts file in the repo starts directly with /* and has no BOM, so this is inconsistent with the codebase and with the project's mandatory prettier --write formatting step (Prettier strips BOMs, so the file likely was not run through it). A leading BOM can confuse some tooling/diffs and pollutes the license header. Remove the BOM so the file starts cleanly with /*.

Quality: Antigravity command description advertises unimplemented features

📄 src/cli/command-tree.ts:253-255 📄 src/cli/commands/integrate/antigravity/declaration.ts:35-48
The command help text states: 'This will install secrets scanning hooks, configure SonarQube Agentic Analysis and MCP Server.' However, the antigravity integration declaration currently exposes only a no-op 'integration-setup' feature; per the code comments, secrets hooks, SQAA, and MCP are deferred to CLI-550/CLI-551. Running the command today does none of what the description promises, which is misleading to users. Consider tempering the description until those features land (e.g. note that setup is in progress) so the help text matches actual behavior.

Bug: Unawaited rejects assertion makes 'invalid token' test ineffective

📄 tests/unit/cli/commands/integrate/antigravity/integrate.test.ts:86-91
The it('aborts when token is invalid', ...) callback is synchronous and the expect(...).rejects.toThrow('Token is invalid.') assertion is neither awaited nor returned. As a result the rejection assertion is fire-and-forget: the test completes before the promise settles, so a regression where integrateAntigravity resolves (or throws a different error) would not fail this test. The promise is also left dangling, which can surface as an unhandled rejection in another test. Additionally, expect(installIntegrationSpy).not.toHaveBeenCalled() runs synchronously immediately after kicking off the async call, so it passes trivially regardless of behavior. Make the callback async and await the rejection before asserting on the spy.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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