Sealights Java Agent - Ignoring specific methods during Build Scan
The custom methods exclude filter allows ignoring of specific methods during the build scan and extends the functionality offered by the filter parameters used by the Sealights build scanner, like files excluded filesexcluded
and packages excluded packagesexcluded
. The customer filter will be provided as an external file in JSON format (see the example below) :
The filter contains a list of rules, grouped by associated class names.
Methods can be excluded according to custom patterns. A pattern may include a method name or even a method signature.
Applying the Custom Filter to the Scan command
Build Scanner CLI
A custom filter file should be provided as an additional input argument to the scan command of the Java Agent
java -jar sl-build-scanner.jar -scan -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -workspacepath "/path/to/war/files" -fi "*.war" -customFilterFile /path/to/customfilter.json
The custom filter may also be passed as a sl.customFilterFile system property and if if both values are provided, the argument value overrides the system property
For build scanner command and parameter usage refer to SeaLights Java agent - Command Reference.