Browse documentation
Documentation / Exclusions & configuration / Config-driven keep rules

Config-driven keep rules

Your own class-level exclusion patterns, for anything the built-in profiles don't cover.

ConditionalClass-level only today; member-level rules are not yet supported.

What it covers

A plain-text file of glob patterns, one per line, matched against a class's dotted name. Three forms are supported:

# exact class
com.example.plugins.PluginApi

# a package and every subpackage
com.example.plugins.**

# only the direct members of one package
com.example.internal.*

Blank lines and #-prefixed comments are ignored. See Configuration for the CLI flag that points at this file.

Scope and boundaries

Matching is class-level only. A kept class is excluded from renaming entirely, which as a side effect means none of its members get renamed either, coarser than a per-member keep rule would allow, but a reasonable default for "I don't fully understand what touches this class, leave it alone." Member-level keep rules, preserving specific fields or methods within an otherwise-renamed class, are not yet supported.

Ordering relative to the built-in framework profiles does not matter: the first profile to match a class wins regardless of which order profiles are checked in.