Task: ScannerInit
Description
This task initializes the DBB source and load module metadata scanners.
Task dependency list
List of tasks that must execute before this task.
- Start
Actions
- Initializes the DBB
DependencyScannerRegistry
class. - Optionally adds user defined source scanners.
- Sets the load module scanner exclude list in the build context.
Syntax
- task: ScannerInit
comment: String # Message printed to stdout when the task begins executing.
condition: Boolean # Boolean expression to optionally execute task. Default is true.
variables:
- name: sourceDefaultScanner # Default scanner for source files with extension that has no scanner mapped.
value: String # Default is "Dummy".
- name: excludeFileList # List of glob file patterns to exclude from scanning.
value: [String] # Default is [".*","**/.*","**.yaml","**.groovy","**.json","**.md"].
- name: loadModuleExcludeList # Comma-separated list of program object patterns to exclude.
value: String # Default is NONE.
- name: scanners # List of DBB dependency source file scanner configurations.
value: # Default - See scanner details below.
- scanner: String # Name of scanner.
extensions: String # Comma separated list of file extensions associated to this scanner.
source: String # (Optional) Java class or Groovy script that implements scanner logic.
Task variables
Required variables
Must be defined for the task to execute.
None
Optional variables
Only need to be defined to change default values.
sourceDefaultScanner
Type: String
Default: Dummy
Default scanner for source files with extension that has no scanner mapped. See Default scanner configurations below.
excludeFileList
Type: List<String>
Default: [".*","**/.*","**.yaml","**.groovy","**.json","**.md"]
List of glob file patterns to exclude source files from scanning. NOTE: This variable will replace the entire default exclude file list.
loadModuleExcludeList
Type: String
Default: NONE
String that contains a comma-separated list of program object patterns to exclude when scanning a load module for static link dependencies. IE: CEE.SCEELKED.*,DFH.V4R1M0.CICS.SDFHLOAD.*
scanners
Type: [Scanner Configuration]
Default: See Default scanner configurations
List of source file dependency scanner configurations.
A scanner configuration list element is defined by three YAML properties: scanner:
, extensions:
, source
:
- scanner: String # Name of scanner.
extensions: String # Comma-separated list of file extensions associated to this scanner.
source: String # (Optional) Java or Groovy class that implements the scanner logic.
Scanner configurations can be used to add additional file extensions for existing scanner configurations. Example:
- scanner: COBOL
extensions: cob,copy # This will append `cob,copy` to the existing extensions `cbl,cpy`.
Scanner configurations can be used to add new DBB dependency source file scanners. Example:
- scanner: DTL
extensions: dtl
source: com.company.dbb.extensions.scanners.DTLDependencyScanner
See Creating a custom dependency scanner for more information on how to create a custom scanner.
Default scanner configurations
The following source code scanners are pre-configured for use by the zBuilder and do not need to be defined unless you need to add additional file extensions for the language.
- scanner: Assembler
extensions: asm,mac
- scanner: C
extensions: c,h
- scanner: COBOL
extensions: cbl,cpy
- scanner: C++
extensions: cpp,hpp
- scanner: PL/I
extensions: pli,inc
- scanner: REXX
extensions: rexx,rex
- scanner: UnitTest
extensions: bzucfg
- scanner: Dummy # Can be used to explicitly create dummy logical files for specific file types.
extensions:
The Dummy scanner is the default source file scanner used when scanning source files with no scanner configured file extension. It creates a dummy logical file without actually scanning the source file that can be added to metadata collections.
Build Context (advanced)
In addition to the task variables provided by users in the DBB YAML configuration files, some tasks require inputs and generate outputs to the zBuilder Build Context. The Build Context is a dynamic storage area passed into each task being executed by the zBuilder and is used for task-to-task communication.
Build Context inputs
None
Build Context outputs
Keyword | Type | Description |
---|---|---|
loadModuleExcludeList |
String | List of program object patterns to exclude when scanning a load module for static link dependencies. |