Skip to content

Linkage Checker Exclusion File

Tomo Suzuki edited this page Apr 10, 2020 · 10 revisions

A Linkage Checker exclusion file is an XML file to specify exclusion rules for linkage errors.

A linkage error is an invalid reference from a class to a symbol in another class. A symbol may be a class, a method, or a field. We call the referencing class “source”, and the referenced symbol as “target”. The relationship is illustrated below. The allow indicates an invalid reference from a source class to a target symbol.

References from source class to target symbol

For the example usage of this file, refer to Default Exclusion Rules section.

Format

The exclusion file is an XML file (See a complete example file is in Example). Its top-level element is LinkageCheckerFilter.

Elements

  • A LinkageCheckerFilter element has zero or more LinkageError elements.
  • A LinkageError element has at least one of Target element and Source element. It also has optional Reason element.
  • A Target element has one Package, Class, Method, and Field elements.
  • A Source element has one Package, and Class elements.
  • A Reason element has a text node to explain why it is fine to suppress the linkage error.

Attributes

  • Package, Class, Method, and Field elements have “name” attribute.
  • Method and Field elements have “className” attribute.

Default Exclusion Rules

By default, Linkage Checker uses exclusion rules in linkage-checker-exclusion-default.xml.