Skip to content

Configuration Files Priority #1727

@SammLauzon

Description

@SammLauzon

Hello!

I have a question regarding how Robocop handles configuration files.

I am currently using Robocop for a new Robot Framework project. I've centralized my settings in a robocop.toml file which is shared across several repositories.

While looking at the source code (manager.py#L19), I noticed that the search files are defined using a frozenset. From my understanding, this produces an unpredictable priority order because a frozenset uses hashes to determine the iteration sequence.

Consequently, if both a robocop.toml and a pyproject.toml exist in the same directory, the configuration source might vary between runs or environments.

I have a workaround (moving the file or renaming it since I use the extend feature in pyproject.toml), but I wanted to ask: is this behavior intended? It seems that a predetermined priority (using a list or a tuple) would be clearer and would avoid potential confusion.

Thanks a lot for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions