robotframework-robocop
robotframework-robocop copied to clipboard
[Bug] The --ext-rules option does properly support a relative path
What happened?
When a relative path is used with --ext-rules it works only if robocop is invoked from a directory for which the relative path is valid. This is an issue when specifying --ext-rules in a .robocop file since in that case it does not work if, for example, you invoke robocop from a subdirectory of the directory containing the .robcop file.
As an example, the following entry in .robocop works only if robocop is invoked from the same directory that contains the .robocop file.
--ext-rules .robocop-custom.py
Operating System
No response
Robocop version
>= 2.0.1
Thank you for the report. It was reported some time ago and I've decided to fix it only for pyproject.toml
. .robocop
requires more work. But since it's the second time it's reported I will think about it if it's worth the time invested.
It's also described in our docs in https://robocop.readthedocs.io/en/stable/user_guide.html -> "Loading configuration from file" -> "Relative paths in the configuration".
The workaround for you is to use pyproject.toml
instead or use absolute paths.