Skip to content

Add plugin functionality #1538

@bhirsz

Description

@bhirsz

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"
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions