We support multiple ways of importing user defined objects - rules, formatters, reports (in the future) and configs (via extends). We should add an option to register robocop plugin to simplify it.
For example, we can use metadata entrypoints:
[project]
name = "example-plugin"
[project.entry-points."robocop.plugins"]
example = "example_plugin.path.to.dir"
Robocop will automatically discover example plugin when you install example-plugin package. It will read the path where it points ("example_plugin.path.to.dir"). It could automatically discover rules, formatters, reports and configs.
We could then use config inheritance:
[tool.robocop]
extends = ["example.config.config_name"]
Which could contain references to custom objects:
[tool.robocop.lint]
custom-rules = ["example.rules"]
[tool.robocop.format]
select = [
"example.formatters.FormatterA"
]
We support multiple ways of importing user defined objects - rules, formatters, reports (in the future) and configs (via extends). We should add an option to register robocop plugin to simplify it.
For example, we can use metadata entrypoints:
Robocop will automatically discover
exampleplugin when you installexample-pluginpackage. It will read the path where it points ("example_plugin.path.to.dir"). It could automatically discover rules, formatters, reports and configs.We could then use config inheritance:
Which could contain references to custom objects: