FlexNet Code Insight 6.13.2
Two or more scan-phase adapter scripts can use the same scan-phase method, such as afterAnalysis2. When the scan calls the method, it is executed across all scripts containing it. The order in which the method is executed across the scripts depends on the alphabetic order of the script names. For example, the autorun.CodeAwareAnalyzer.groovy script uses the afterAnalysis2 method in which to execute CodeAware. If your custom adapter script, named autorun.CustomAdapter.groovy, also uses the afterAnalysis2 method in which to run your custom adapter code, the autorun.CodeAwareAnalyzer.groovy script runs first alphabetically, thus executing CodeAware first, followed by the execution of your custom adapter script. If you want your script to load before CodeAware, you need to provide a name for your script that alphabetically positions it before the CodeAware script, such as autorun.bbb.groovy.
The exception to the alphabetic order in which a given method is run across scripts is the Analyzer scan-phase adapter script (autorun. Analyzer.groovy), which is always run last in the Analyzer2 scan phase, and thus at the end of the scan process. Therefore, if you want your custom scan-phase adapter to run after the Analyzer, use file name conventions similar to the following (which uses customAdapter as the example name of the custom scan adapter):
• | Rename the Analyzer adapter script file to zzz.autorun.Analyzer.groovy. |
• | Save your custom script with a file name that is positioned alphabetically after the Analyzer adapter name. For example, you might name the custom adapter script zzz.customAdapter.groovy. |
If you prefer not to use alphabetical order in which to run your custom scan-phase adapter within a given scan phase, you can customize the order in which it runs. See Customizing the Scan Phase Order.
FlexNet Code Insight 6.13.2 Online Help LibraryAugust 2019 |
Copyright Information | Flexera Software |