Skip to content

Add option validation to plugin compiler #11366

@mnonnenmacher

Description

@mnonnenmacher

As it is possible to define aliases for plugin options, there could be overlaps which make it ambiguous which option is meant. For example:

PluginConfig(
  val option1: String,

  @PluginOption(aliases = ["option1"])
  val option2: String
)

In this example it is ambiguous which actual option an "option1" entry in the config map refers to.

Add validation to the plugin compiler that reports an error if any such overlaps exist.

The same problem exists for enum options after #11268 is merged, so similar validation must be added.

Metadata

Metadata

Assignees

Labels

pluginTopics related to ORT plugins

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions