ConfigurationElement

@propertyWrapper
public struct ConfigurationElement<T> : Equatable where T : Equatable, T : AcceptableByConfigurationElement

A single parameter of a rule configuration.

Apply it to a simple (e.g. boolean) property like

@ConfigurationElement(key: "name")
var property = true

If the wrapped element is an InlinableOptionType, there are two options for its representation in the documentation:

  1. It can be inlined into the parent configuration. For that, do not provide a name as an argument. E.g. swift @ConfigurationElement(key: "name") var property = true @ConfigurationElement var levels = SeverityLevelsConfiguration(warning: 1, error: 2) will be documented as a linear list: name: true warning: 1 error: 2
  2. It can be represented as a separate nested configuration. In this case, it must have a name. E.g. swift @ConfigurationElement(key: "name") var property = true @ConfigurationElement(key: "levels") var levels = SeverityLevelsConfiguration(warning: 1, error: 2) will have a nested configuration section: name: true levels: warning: 1 error: 2