After launching sf hardis:doc:project2markdown there are log lines like this:
Using temp directory /tmp/sfdx-hardis-ml4hv
Error generating Apex documentation: [
"Error(s) occurred while parsing files. Please review the following issues:",
"Source file: force-app/main/default/classes/my_class.cls\nException: Error parsing Apex Body. Line 378:52 - missing ';' at '('\n"
]
First of all, I have to tell that all class files and triggers were just retrieved from the org and are deployable.
The line 378 in question is nothing suspicious:
private static void AdjustSL_SE_Date_FromJanuary(...
Offset :52 points to 'r' in word January above.
It ends up not generating any apex or trigger .md files. Objects, flows, etc are generated.
If the my_class.cls is deleted along with it's -meta.xml, then another set of errors for triggers appears, like this:
"Source file: force-app/main/default/triggers/Account_trigger_vod.trigger\nException: Error parsing Apex Body. Line 1:39 - extraneous input 'bulk' expecting '('\n",
Here is the 1st line of example trigger:
trigger Account_trigger_vod on Account bulk (before delete, after delete) {
I tried to delete all triggers mentioned in error message. It leads to apex .md files are generated, but triggers .md are still not generated, despite no visible errors.
The generation time for sf hardis:doc:project2markdown is always 6-7 minutes in my project (no AI integration) and is unrelated to errors above.
node --version
v24.11.1
sf --version
@salesforce/cli/2.114.5 wsl-x64 node-v24.11.1
sf plugins
@salesforce/commerce 252.0.0
@salesforce/sfdx-scanner 4.2.0 (latest-beta)
code-analyzer 5.0.0 (5.0.0)
community 3.2.32 (3.2.32)
dev 2.5.1 (2.5.1)
packaging 2.23.5
sfdmu 4.38.0
sfdx-git-delta 6.24.0
sfdx-hardis 6.14.2
signups 2.6.43 (2.6.43)
texei-sfdx-plugin 2.8.3
After launching
sf hardis:doc:project2markdownthere are log lines like this:First of all, I have to tell that all class files and triggers were just retrieved from the org and are deployable.
The line 378 in question is nothing suspicious:
Offset :52 points to 'r' in word January above.
It ends up not generating any apex or trigger .md files. Objects, flows, etc are generated.
If the my_class.cls is deleted along with it's -meta.xml, then another set of errors for triggers appears, like this:
Here is the 1st line of example trigger:
I tried to delete all triggers mentioned in error message. It leads to apex .md files are generated, but triggers .md are still not generated, despite no visible errors.
The generation time for
sf hardis:doc:project2markdownis always 6-7 minutes in my project (no AI integration) and is unrelated to errors above.