Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The output file keeps empty when it is only specified in the configfile. #1132

Open
cz-lucas opened this issue Oct 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cz-lucas
Copy link

What happened?

Run robocop with the following pyproject.toml file:

[tool.robocop]
reports = [
    "rules_by_id",
    "scan_timer"
]
filetypes = [".resource", ".robot"]
threshold = "I"
format = "{source}:{line}:{col} [{severity}] {rule_id} {desc} (name)"
output = "../results/robocop.log"

It also won't work with the example from the documentation.

What command/code did you try to run?

python -m robocop . and robocop .`

What is the full error message?

The file where the output should be written in is created but empty. Everything is printed to the console. If I run robocop with the ---config results/robocop.log everything works as expected.

What did you expect to happen instead?

The output is written to the file that is specified with the output in the pyproject.toml.

Operating System

Windows 10

Robocop version

5.5.4 and 5.5.0

@cz-lucas cz-lucas added the bug Something isn't working label Oct 21, 2024
@cz-lucas cz-lucas changed the title [Bug] Nothing is written to the output-file if it specified in a config-file. [Bug] The output file keeps empty when it is only specified in the configfile. Oct 21, 2024
@bhirsz
Copy link
Member

bhirsz commented Nov 6, 2024

Ugh, thats quite important bug. I will see if we have some tests for it and why it was not catched. Thanks for the report.

Our output handling is not the best - there is idea to rewrite it a bit so it will also solve this case hopefully. I will make sure to add tests for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants