Skip to content

Print Issues

Report name: print_issues

Report that collect diagnostic messages and print them at the end of the execution.

It is a default, always enabled report.

Configuration

Output format

Use output_format parameter to configure an output format. Supported output types are:

  • extended (default), which print issue together with source code:

    > robocop check
    test.robot:2:14 DEPR02 'Run Keyword If' is deprecated since Robot Framework version 5.*, use 'IF' instead
       |
     1 | *** Settings ***
     2 | Suite Setup  Run Keyword If
       |              ^^^^^^^^^^^^^^ DEPR02
     3 | Suite Teardown  Run Keyword If
     4 | Force Tags         tag
       |
    
  • grouped, which prints issues grouped by source files:

    > robocop check --configure print_issues.output_format=grouped
    templated_suite.robot:
      1:1 MISC06 No tests in 'templated_suite.robot' file, consider renaming to 'templated_suite.resource' (can-be-resource-file)
      2:18 DEPR02 'Run Keyword Unless' is deprecated since Robot Framework version 5.*, use 'IF' instead (deprecated-statement)
    
    test.robot:
      1:1 DOC03 Missing documentation in suite (missing-doc-suite)
      3:17 DEPR02 'Run Keyword If' is deprecated since Robot Framework version 5.*, use 'IF' instead (deprecated-statement)
    
  • simple, which print issue in one line. It also allows configuring the format of a message:

    > robocop check --configure print_issues.output_format=simple
    variable_errors.robot:7:1 [E] ERR01 Robot Framework syntax error: Invalid dictionary variable item '1'. Items must use 'name=value' syntax or be dictionary variables themselves.
    positional_args.robot:3:32 [E] ERR01 Robot Framework syntax error: Positional argument '${arg2}' follows named argument
    

Configuration example:

robocop check --configure print_issues.output_format=grouped
[tool.robocop.lint]
configure = [
    "print_issues.output_format=grouped"
]

Format of the simple output type can be configured with the global --issue-format option:

robocop check --issue-format "{source}:{line}:{col} [{severity}] {rule_id} {desc} ({name})"
[tool.robocop.lint]
issue-format = "{source}:{line}:{col} [{severity}] {rule_id} {desc} ({name})"

Issue format

issue_format parameter allows configuring the format of an issue in extended (default) output type:

robocop check --configure print_issues.issue_format="{source}"
[tool.robocop.lint]
configure = [
    "print_issues.issue_format={source}"
]

Disable print_issues report

To turn off a print_issues report, set enabled toFalse:

robocop check --configure print_issues.enabled=False
[tool.robocop.lint]
configure = [
    "print_issues.enabled=False"
]

If the goal is to disable all output, use --silent instead.