Skip to content

Migrate local Codacy analysis from the legacy CLI #23367

Description

@ktsaou

Problem

The repository-local Codacy pre-push wrapper currently uses a digest-pinned codacy-analysis-cli 7.10.1 compatibility runner. Upstream now labels that implementation as a legacy component that is no longer actively maintained for local analysis and recommends Codacy CLI v2:

A direct replacement is not currently equivalent:

  • CLI v2 requires its own .codacy/codacy.yaml initialization and tool installation workflow.
  • Anonymous CLI v2 runs use repository linter configuration or Codacy defaults; Cloud configuration parity requires authenticated initialization.
  • CLI v2's current supported-tool surface omits ShellCheck and markdownlint, which the existing wrapper uses to reproduce Codacy Cloud findings for this repository.

Removing the legacy runner now would therefore lose analyzer coverage or change the configuration/report contract silently.

Clean end state

Replace the legacy Analysis CLI compatibility path with a maintained local-analysis implementation while preserving the wrapper's purpose: reproducible pre-push evidence that is as close as possible to Codacy Cloud analysis.

Acceptance criteria

  • Use Codacy CLI v2, or maintained direct analyzer integrations where v2 lacks a required Cloud analyzer.
  • Preserve ShellCheck and markdownlint coverage, or demonstrate a reviewed equivalent with the same repository configuration and finding semantics.
  • Define how .codacy.yml/Cloud settings reconcile with CLI v2's .codacy/codacy.yaml and authenticated versus anonymous modes.
  • Pin every downloaded executable/tool version or immutable image digest used by the wrapper.
  • Preserve closed JSON/SARIF shape validation, incomplete-analysis failure handling, concurrent output safety, and token non-disclosure.
  • Update the Codacy skill, how-tos, mock contract suite, and local validation evidence.
  • Remove the legacy 7.10.1 image/binary acceptance path after parity is proven.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions