Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

For build scanner command and parameter usage refer to SeaLights Java agent - Command Reference.

Sealights plugins configuration

A custom filter file may be provided as a system property sl.customFilterFile inside sealightsJvmParamssection in the JSON fie for the Maven or Gradle plugins.

The JSON file fragment example:

Code Block
"sealightsJvmParams": {
    "sl.customFilterFile": "config/CustomFilter.json"
}

The resulting Maven pom file fragment example:

Code Block
<sealightsJvmParams>
      <sl.customFilterFile>config/CustomFilter.json</sl.customFilterFile>
</sealightsJvmParams>

Custom Filter Sample file

...

Class name pattern notation

  1. May be an exact value or a regular expression

  2. A sign '$' in the nested class pattern will not be handled as a regex special character, but as a part of the name

  3. A pattern should not contain a file extension

Example:

Apply for class MyClass and any nested class of MyClass:

...

Code Block
public .* get[A-Z]*()
*calculate(int, boolean, List)
* run(.*)

Filter handling

  1. The custom methods filter is applied after the files filter: it is applied to files and packages that were included.

  2. Include rules are intended to add “exceptions” to exclude rules and are checked first. If a particular method matches any include rule, it will not be excluded

Note

If the same pattern appears in includes and excludes, the include rule always overwrites the exclusion and the appropriate method will not be excluded.

...