[Feature Request] Support PMD incremental analysis cache in code-analyzer.yml and CLI
まだ誰も着手していません。
評価
- 難易度
- 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
-
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. -
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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
forcedotcom/code-analyzer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
forcedotcom/code-analyzer#2106 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
forcedotcom/code-analyzer#2094 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
forcedotcom/code-analyzer#2093 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
forcedotcom/code-analyzer#2091 ·
-
[BUG][code-analyzer] sfge: calling toString() on an enum aborts the entry point (UnimplementedMethodException)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
forcedotcom/code-analyzer#2090 ·
forcedotcom/code-analyzer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
メンテナーはふだん 2 日以内に返信
-
BeOS .json missingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mihaip/infinite-mac#475 ·
-
Let TypeScript accept an initial object in ReactiveDict対応中かも @yograj-vijay-yadav が今日担当しました。 オープンbug good first issue help wanted workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
meteor/meteor#14919 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
marmelab/atomic-crm#401 ·
メンテナーはふだん 1 日以内に返信
-
account: profile
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 5 日以内に返信