Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feature Request] Support PMD incremental analysis cache in code-analyzer.yml and CLI

オープン
#2,109 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
tooling

調査の方向性

Start by reading the PMD engine wrapper and its configuration handling, then trace how sf code-analyzer run builds the PMD command. The issue does not name those files or tests, so locate the existing PMD options and related tests first. Done means a configured cache path reaches PMD as --cache <path> and the behavior is covered for the YAML configuration or CLI option.

索引モデルが issue の本文から書いたものです。

説明

Product Area

An Engine

Your Need or Problem

Related to #671 .
Was this implemented in v5 or is it still planned to be implemented in the future?

In large enterprise codebases with hundreds of Apex classes and custom PMD rulesets, running static code analysis via sf code-analyzer run can take a significant amount of time.

Your Desired Solution
1. Configuration in code-analyzer.yml

Expose a configuration property under engines.pmd to specify the cache file path or toggle caching:

engines:
  pmd:
    cache_file: .pmdcache       # Path to the incremental analysis cache file
    custom_rulesets:
      - config/pmd-ruleset.xml
2. Passthrough to PMD Runtime

When cache_file is specified (or enabled via a CLI flag such as --pmd-cache), the PMD engine wrapper should append --cache to the underlying PMD command invocation.

Alternatives Considered
  1. Targeting files via git diff:
    Passing only changed files (--target) works for simple commit-level scans, but it does not maintain a persistent baseline for full-branch audits, nightly builds, or full CI matrix runs where a full repository scan is expected.

  2. Invoking native PMD directly:
    Running native PMD CLI (pmd check --cache ...) allows incremental analysis, but we lose Salesforce Code Analyzer’s unified reporting, severity normalization, exit code management, and multi-engine orchestration (e.g., combining PMD with ESLint or Sfge).

Additional Context (Screenshots, Files, etc)
  • Target Engine: PMD (PMD 7.x)

  • Environment: Enterprise CI/CD pipelines (GitHub Actions, Azure DevOps, GitLab CI) and local pre-commit hooks where reducing turnaround time directly improves developer productivity.

Workaround

No response

Urgency

Low

主要言語
TypeScript
スター
241
フォーク
53
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

forcedotcom/code-analyzer のほかの issue

forcedotcom/code-analyzer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。