Skip to content

docs: replace Codacy CLI v2 with the Analysis CLI [OD-742] - #2821

Open
alerizzo wants to merge 1 commit into
masterfrom
docs/replace-cli-v2-with-analysis-cli
Open

alerizzo wants to merge 1 commit into
masterfrom
docs/replace-cli-v2-with-analysis-cli

Conversation

@alerizzo

@alerizzo alerizzo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codacy CLI v2 is deprecated. This PR points the remaining user guidance (outside release notes) at the Codacy Analysis CLI and its GitHub Action. Linear: OD-742, OD-744, OD-746, OD-747.

  • Dart Analyzer (running-dartanalyzer.md, OD-744/OD-746): rewritten to match the ESLint page.
    • A new "Dart SDK and dependencies" section: the managed SDK via --install-dependencies, or dart on PATH, and why dart pub get must run first.
    • Manual setup with codacy-analysis.
    • A GitHub Action section with codacy/analysis-cli-action@v1.
    • This also fixes the old step that ran analyze where it meant upload.
  • Container scanning (security/container-scanning.md, OD-742):
    • CI/CD integration uses codacy-analysis upload-sbom, with the same rolling and per-release snippets the app shows (codacy-spa PR);
    • the manual-upload note now points to upload-sbom;
    • "No results yet" now suggests codacy-analysis container-scan.
  • SBOM API example: the CLI v2 link now points to the Analysis CLI's new "Scan container images" section.
  • Analysis CLI page:
    • adds a container scanning section and --max-file-size under "Tune the run";
    • adds a validate-configuration tip;
    • replaces the outdated "only reports from this CLI are accepted" line with how third-party SARIF is uploaded (--tool).
  • 150 KB FAQ (OD-747): use codacy-analysis analyze --max-file-size 1MB, then upload, instead of the legacy Scala CLI.
  • Configuration file page: validate with codacy-analysis validate-configuration.
  • Self-hosted: removed "Codacy CLI v2, which connects only to Codacy Cloud" from the Cloud-only list.

⚠️ Merge after the analysis-cli release that ships --max-file-size and validate-configuration (codacy/analysis-cli PR). The FAQ, configuration-file and Analysis CLI pages document them.

Out of scope on purpose: the Guardrails JetBrains section (that extension still uses CLI v2), and the legacy-CLI references for aligncheck, deadcode and SpotBugs (only the legacy CLI runs those tools).

👀 Live preview

🚧 To do

  • If relevant, include the Jira issue key at the end of the pull request title
  • Perform a self-review of the changes (mkdocs build --strict passes; grep -ri "cli-v2\|cli v2" finds nothing outside release notes)
  • Fix any issues reported by the CI/CD (Vale did not run locally)

🤖 Generated with Claude Code

CLI v2 is deprecated. Point the remaining user guidance at the Codacy
Analysis CLI:

- Dart Analyzer page: manual setup and GitHub Action use
  codacy-analysis and codacy/analysis-cli-action@v1 (OD-744, OD-746)
- Container scanning and SBOM API pages: upload-sbom / container-scan,
  matching the in-app CI/CD snippets (OD-742)
- 150 KB FAQ: analyze --max-file-size (OD-747)
- Configuration file page: codacy-analysis validate-configuration
- Analysis CLI page: container-scanning section, third-party SARIF note
- Self-hosted: drop the CLI v2 "Cloud only" entry

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alerizzo
alerizzo requested a review from a team as a code owner November 9, 2026 16:35
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Overall readability score: 54.6 (🟢 +0.1)

File Readability
container-scanning.md 80.56 (🟢 +0.39)
codacy-configuration-file.md 57.47 (🟢 +0.47)
running-dartanalyzer.md 69.14 (🟢 +20.73)
why-is-my-file-over-150-kb-missing.md 63.35 (🟢 +8.42)
uploading-container-image-sboms.md 73.09 (🔴 -0.27)
index.md 68.08 (🟢 +0.8)
whats-available-on-codacy-self-hosted.md 48.3 (🔴 -0.41)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
container-scanning.md 80.56 57.98 7.51 7.8 8.87 5.91
  🟢 +0.39 🟢 +0.11 🟢 +0.1 🟢 +0 🟢 +0.05 🟢 +0.04
codacy-configuration-file.md 57.47 36.39 10.27 12.8 12.47 6.67
  🟢 +0.47 🟢 +0.11 🟢 +0.09 🟢 +0.1 🟢 +0.11 🟢 +0
running-dartanalyzer.md 69.14 47.89 8.3 10 10.37 6.87
  🟢 +20.73 🟢 +6.19 🟢 +4.54 🟢 +3.6 🟢 +0.6 🟢 +1.82
why-is-my-file-over-150-kb-missing.md 63.35 52.6 11.34 10.4 9.69 7.41
  🟢 +8.42 🟢 +10.6 🟢 +1.46 🟢 +1.5 🟢 +0.7 🟢 +0.31
uploading-container-image-sboms.md 73.09 57.47 8.82 8.6 9.68 6.79
  🔴 -0.27 🟢 +0 🔴 -0.07 🟢 +0 🔴 -0.06 🔴 -0.02
index.md 68.08 52.9 9.78 10.7 9.98 6.52
  🟢 +0.8 🟢 +0.41 🟢 +0.15 🟢 +0.2 🟢 +0.06 🟢 +0.03
whats-available-on-codacy-self-hosted.md 48.3 33.71 9.84 13.5 15.36 8.03
  🔴 -0.41 🟢 +0.3 🟢 +0.01 🟢 +0 🔴 -0.18 🔴 -0.07

Averages:

  Readability FRE GF ARI CLI DCRS
Average 54.6 43.02 10.79 12.27 12.31 7.94
  🟢 +0.1 🟢 +0.06 🟢 +0.02 🟢 +0.02 🟢 +0 🟢 +0.01
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

@codacy-production codacy-production Bot left a comment

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.

Pull Request Overview

👀 Worth a closer look

Two documentation issues need review in the Dart Analyzer guide: the manual workflow does not explain authentication required for remote configuration and result uploads, and a heading change may break existing deep links. No Codacy quality summary was provided.

Test suggestions

  • Build the MkDocs site in strict mode and verify all changed links, anchors, and navigation references.
  • Search non-release-note documentation for remaining CLI v2 references.
  • Verify the Dart Analyzer manual and GitHub Action examples use the Analysis CLI and upload results correctly.
  • Verify container scanning examples cover rolling tags, per-release tags, SBOM uploads, and local scans.
  • Verify the new Analysis CLI commands and options are documented consistently across the CLI, FAQ, and configuration pages.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Build the MkDocs site in strict mode and verify all changed links, anchors, and navigation references.
2. Search non-release-note documentation for remaining CLI v2 references.
3. Verify the Dart Analyzer manual and GitHub Action examples use the Analysis CLI and upload results correctly.
4. Verify container scanning examples cover rolling tags, per-release tags, SBOM uploads, and local scans.
5. Verify the new Analysis CLI commands and options are documented consistently across the CLI, FAQ, and configuration pages.

TIP How was this review? Give us feedback

%}

## Important Concepts
## Dart SDK and dependencies

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.

🟡 MEDIUM RISK

Preserve the existing #important-concepts anchor alongside the new heading so existing deep links continue to work.

TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Dismissing. The old "Important concepts" section described CLI v2's .codacy/codacy.yaml, which no longer applies, so an anchor that lands readers on SDK setup would be misleading. A stale #important-concepts link still opens the page, just at the top. No internal link uses it: mkdocs build --strict passes.

🤖 Generated by /pr-fixup command


```bash
npm i -g @codacy/analysis-cli
codacy-analysis init --remote <gh|gl|bb> <ORGANIZATION> <REPOSITORY>

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.

🟡 MEDIUM RISK

Document the authentication steps required for both remote configuration initialization and result uploads before running these commands.

TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

False positive. Authentication is the first step of the shared client-side tool instructions included at the top of this page (client-side-tool-instructions.md, step 1: CODACY_PROJECT_TOKEN or CODACY_API_TOKEN), the same as on the ESLint page. Both init --remote and upload read those variables.

🤖 Generated by /pr-fixup command

This branch was successfully deployed

1 active deployment
Netlify — ca841291 Deployed Nov 9, 2026 by github-actions[bot]
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.

1 participant