When HighlightAutomation.jar is run from outside the directory (which has the jar), then an error is thrown "Directory containing perl script for analyzer should exist"
Even after the parameter --perlInstallDir was provided, user is getting the error "failed with code 6"
Solution
- Should use --analyzerDir since the analyzer is run from a different directory.
Try adding --analyzerDir parameter in the command.
for eg --analyzerDir "c:/aa/perl"
and
give a complete directory path for --sourceDir too starting from C:
A sample command for Command Line version : 5.3.18-RELEASE which is tested by running from outside the directory (which has the jar) is shown below.
java -jar Highlight-Automation-Command/HighlightAutomation.jar --workingDir Highlight-Automation-Command/Results --sourceDir Highlight-Automation-Command/Source --analyzerDir Highlight-Automation-Command/perl --skipUpload --zipResult Highlight-Automation-Command/Results/result.zip
- If using the --perlinstallDir ensure that it is referencing the directory (Root directory for Perl installation),and not the file reference to avoid the "Directory containing perl script for analyzer should exist" error. Please refer Highlight Automated Code Scan (Command Line)
- Check if the intended paths for --perlInstallDir and --analyzerDir are set correctly.
--perlInstallDir
is the location of the perl installation
--analyzerDir
is for the location of the CLI perl analyzers
The code reader installs perl in the strawberry perl directory and the CLI directory holds the CLI perl analyzers. Please refer Highlight Automated Code Scan (Command Line)
NB: Code 6 is for Command Line source dir or output dir validation error CAST HIGHLIGHT - CLI - Error code 6 - Command Line source dir or output dir validation error
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Ticket
28800, 48345, 49185
Comments