Description
Have you tried to resolve this issue yourself first?
- I confirm I have gone through the above steps and still have an issue to report.
Bug Description
Running sf code analyzer v5 against a package (about 350k lines of code) gets stuck for PMD. It reaches about 25% completion in a few minutes, but then stops progressing. I let it run for over 16 hours without any progress.
Output / Logs
% sf code-analyzer run --rule-selector pmd --rule-selector Recommended:Security --output-file CodeAnalyzerReport.html --config-file code-analyzer.yml
Streaming logs in real time to:
./ca-logs/sfca-2025_06_16_17_55_36_000.log
eslint [17:55:37]: The ESLint ignore file '.eslintignore' was found but not applied.
To apply this ignore file, set it as the eslint_ignore_file value in your Code Analyzer configuration. For example:
engines:
eslint:
eslint_ignore_file: ".eslintignore"
Alternatively, to have Code Analyzer automatically discover and apply any ESLint configuration and ignore files found in your workspace, set the auto_discover_eslint_config value to true.
Selecting rules... done.
› Error: eslint [17:56:52]: When scanning file './force-app/main/default/staticresources/tinymce/tinymce/tinymce.d.ts' with the eslint engine, ESLint gave the following
› error:
› Parsing error: project was set to true
but couldn't find any tsconfig.json relative to './force-app/main/default/staticresources/tinymce/tinymce/tinymce.d.ts' within
› '.'.
› Error: eslint [17:56:52]: When scanning file './submodules/framework/framework/default/sobject-attributes/lwc/sobjectAttributeUtils/typings/sobjectAttributeUtils.d.ts'
› with the eslint engine, ESLint gave the following error:
› Parsing error: project was set to true
but couldn't find any tsconfig.json relative to
› './submodules/framework/framework/default/sobject-attributes/lwc/sobjectAttributeUtils/typings/sobjectAttributeUtils.d.ts' within
› '.'.
› Error: eslint [17:56:52]: When scanning file './submodules/framework/typings/labels.resource.d.ts' with the eslint engine, ESLint gave the following error:
› Parsing error: project was set to true
but couldn't find any tsconfig.json relative to './submodules/framework/typings/labels.resource.d.ts' within
› '.'.
Executing rules... ⣯ 3 of 4 engines finished after 61990s.
- retire-js at 100% completion.
- regex at 100% completion.
- eslint at 100% completion.
- pmd at 25.7% completion.
sfca-2025_06_16_17_55_36_000.log
sfca-sfge-2025_06_16_16_54_53_250.log
Steps To Reproduce
- Run any of the following commands:
(Running it for AppExchange security review, with logs)
sf code-analyzer run --rule-selector pmd --rule-selector Recommended:Security --output-file CodeAnalyzerReport.html --config-file code-analyzer.yml
OR
(Running it for AppExchange security review, without logs)
sf code-analyzer run --rule-selector pmd --rule-selector Recommended:Security --output-file CodeAnalyzerReport.html
Expected Behavior
It should complete OR report any errors on the console output or logs. There is nothing in the logs (see attached).
Operating System
MacOS sequoia 15.3 (24D60)
Salesforce CLI Version
@salesforce/cli/2.92.7
Code Analyzer Plugin (code-analyzer) Version
code-analyzer 5.1.0
Node Version
v22.14.0
Java Version
openjdk version "17.0.11" 2024-04-16
Python Version
Python 3.13.5
Additional Context (Screenshots, Files, etc)
Tried on different machines with the same codebase, getting the same results.
Workaround
Not aware of any workaround. I was hoping that if logs show any files that cause the PMD engine to freeze, I could remove those files and run the scan again.
Urgency
Moderate