Analysis is found to proceed after the discovery step but only limited or partial results are there. Many of the reasons for analysis to be partial can be found in the analysis logs.
If there are issues with analysis of files it can be seen at the analysis status at folder and file levels and in the summary of scan results. A green label means that files have been correctly scanned with the associated technology, If it is grey it means some files have not been analyzed. The reason for exclusion at file level can be seen when hovering above the label with the cursor.
Sometimes files can be partially analyzed as shown below in the summary of scan results .
Action Plan with Workarounds
- Check whether the analyzer supports the technologies that are used. Please refer CAST HIGHLIGHT - Analyzer - Technologies Frameworks and File extensions supported
- If the file count exceeds 10,000
- Use the CLI based analysis which is less processor intensive or
- It is recommended to split the scan into several separate scans. Multiple scans (different folders), can be run, then output ZIPs for the same application can be uploaded . Results will be aggregated into a single application result.
- Is the code being analyzed on a network drive? If so, please place it on a local drive for better performance.
- Make sure that your analysis machine is not running out of RAM or CPU resources; otherwise, you may want to run on a machine with better resources.
- Check if the file size is in excess of the limit of 3 MB.( Refer page 9 in https://doc.casthighlight.com/Getting-Started-Guide.pdf). In the future the product will have an option to increase file size limit to the value the user will define. But it should be noted that very large files tend to make the analysis less stable due to memory consumption. To manually increase the default file size that is allowed to be scanned, please refer CAST HIGHLIGHT - Analyzer - How to Increase the file size limit set for analysis
- Check the file extensions supported for each programming language . If the files, in the scope for the scan do not use the extensions listed, there is a good chance the analyzer will not be picking them.
- Rename the File extensions as appropriate based on the list, for them to be detected by the local agent. ( Refer pages 35-39 in https://doc.casthighlight.com/Getting-Started-Guide.pdf),
- If an extractor is used, check if the files provided by the extractor is of an extension that the Highlight analyzer can identify. For eg CAST database extractors produce .src extensions by default, but to make it recognizable by the Highlight analyzer it should be renamed
into .sql. More details can be found at CAST HIGHLIGHT - Analyzer - Discovery Step - Highlight is not recognizing files extracted using AIP extractor - For file extensions such as .inc which is a shared file extension between C/C++ and PHP analyzers, if C++ analyzer is not analyzing it, the configuration file can be modified to analyze it using the PHP analyzer. Please refer CAST HIGHLIGHT - Analyzer - Discovery Step - Wrong technology classification when compared with CAST AIP
- Check the best practices for each technology to know about how the analyzer excludes, categorizes separately certain files or where manual selection or deselection of files is required
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing SAP/Abap
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing Javascript
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing UNIX Shell scripts
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing PL/SQL
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing Microsoft T-SQL
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing Visual Basic
- CAST HIGHLIGHT - Local Agent - Discovery Step - Best Practices for Analyzing COBOL
- Minified files are excluded from the health analysis. To detect minified files the analyzer calculates a ratio between instruction lines and total lines of code. If this ratio reaches a specific value, the analyzer considers it as minified and exclude it. It is also indicated in the logs as 23-01-11 16:23:43,750 INFO perl: out: Abort : Wrapped: minified file (ratio=80.4155220396804)
- Framework files by themselves are not analyzed, there should be some related code for the framework files to be processed in Highlight. That is analysis of 3rd party libraries such as pom.xml (Java/Maven), .json (Javascript), and .vcproj (C#), without any associated valid source code is not possible as CAST Highlight is a software intelligence product that primarily analyses source code. As a workaround in order to have these dependencies analyzed you can add code to the analysis to proceed or add a 'dummy' file to get the results. Please refer CAST HIGHLIGHT - Analyzer - Framework files by itself are not analyzed
- Check if any folder name in the path has characters other than English. Ensure that Path length is less than 256 characters and there are no special characters in the path. Move the repository to higher level if needed. Please refer CAST HIGHLIGHT - Analyzer - Discovery Step - Files in subdirectories are not analyzed
- Check whether code is not accessible due to some permission issues.
- Health scores may not get computed if there is only one file or if there is a syntax error . Please refer CAST HIGHLIGHT - Results - Health scores are not getting computed
- Highlight skips certain files such as non-procedural part of the sql code, syntax etc and they are not part of the rules triggered in Highlight. For Database related analyzers, Highlight only analyzes the procedural part of PL/SQL code for analysis ( i.e : functions, procedures, triggers etc), and the non-procedural part of PL/SQL code is excluded from the analysis.
-
There should not be a reuse of the working directory. The working directory should be unique for each analysis. Having a separate directory for each application is often not sufficient to ensure that the working directory is unique. If multiple analyses are setup on the same application, there can potentially be issues. It's best to have a unique working directory for each analysis.
- Remove any files from the scan scope which provide no value for the analysis and may end up in increasing the code size and also resulting in memory based performance issue. eg generated code like *.t.ds, *.flow.js also build and deployment folders .git,.svn etc. Please refer CAST HIGHLIGHT - Local Agent - Discovery Step - Additional files that should be excluded or included in the analysis
- Code can also be excluded from analysis. To find out the reason why a file is excluded from the analysis refer CAST HIGHLIGHT - Analyzer - Analysis Step - Reasons for the code to be excluded from analysis . The reason why a file is not scanned can be found out by hovering on the grey pill in the status column.
- If there is an error "Following analysis have been aborted due to errors. Corresponding results could be incomplete and excluded from next steps", provide the the csv file that will be in your working directory, to support in order to investigate the reason. Please refer CAST HIGHLIGHT - Analyzer - Following analyses have been aborted due to errors.
- When the closing date of the campaign is in the past, uploading results of an application to an existing campaign may result in the results to be not seen for the application in the Dashboard. Please refer CAST HIGHLIGHT - Results - Application Scan results not showing up on the portal despite scan completion and upload
- If issue persists check the Log files available in the machine where the analyzer is running. An example path for the log file is C:\Users\[USERNAME]\AppData\Local\nw\analyzes\ . Each code scan creates a numbered sub-folder which contains scan log files. The reason for a partial analysis is generally indicated in analysis log files. The support team would need them in order to investigate further. Please note that stderr and stdout logs will not give any hint.
-
- If the issue can be identified to occur during a specific code scan, please zip log files of that particular numbered sub-folder and send it as an attachment to CAST support at https://help.castsoftware.com.
-
- If needed use the dichotomy process on the file to find out the section having specific problem, An example of using the dichotomy process is given here CAST HIGHLIGHT - Analyzer - How to Use dichotomy process when Files are showing as partially analyzed
-
- If you scan with the Local Agent (GUI), check the .casthighlight file created by the Agent and stored in the root source folder for hints. The .casthighlight file configuration file contain scan settings that are saved to make discovery faster for further analysis of a same folder, until it is kept.
- If wrong technologies are selected for a folder which is chosen for another technology, after the correct selection of technologies and before the re-scan, ensure that .casthighlight file is deleted from the root folder ie If the scan is made with the Local Agent (GUI).
- If needed do a re-scanning along with the generation of the logs, based on the instruction from support. To activate the execution logs when launching a code scan hold CTRL while clicking on the Scan button. A .zip file will be created in the folder specified for saving results.
- If command line automation is used then check the HLAutomation.log produced after the command line is run and is stored in the working directory --workingDir set. Please refer
- If the issue can be identified to occur during a specific code scan, please zip log files of that particular numbered sub-folder and send it as an attachment to CAST support at https://help.castsoftware.com.
-
NB: All the COBOL files are not getting scanned because Highlight do not support JCL and copy books, To view the list of COBOL extensions supported please refer CAST HIGHLIGHT - Analyzer - COBOL - All the cobol files are not getting scaned in highlight scan
Related Articles
CAST HIGHLIGHT - Analyzer - Partial scan of PLSQL files
CAST HIGHLIGHT - Analyzer - Analysis Step - Analysis has ended with the code 0x200
CAST HIGHLIGHT - Analyzer - Performance - Campaign taking more time than usual to complete
CAST HIGHLIGHT - Analyzer - Following analyses have been aborted due to errors
Comments