GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • robocop
  • Robocop
  • User Guide
  • Linter
  • Formatter
  • Configuration
  • Plugins
  • Integrations
  • Release Notes
  • Embedded code (Markdown, Python)
  • Migrate to Robocop 6.0
  • Python API Reference
  • Rules
  • Rules list

This view

  • Original page
  • New address

GeezerVison is showing robocop.dev — RoboCop Docs

Robocop¶

Robocop is a tool that performs static code analysis and formatting of Robot Framework code.

It uses official Robot Framework parsing API to parse files and runs a number of checks, looking for potential errors or violations to code quality standards (commonly referred as a linting issues). It can also format code to ensure a consistent code style.

  • 📖 Starting guide


    See how to install and use Robocop

    User Guide

  • Configuration


    Configure Robocop to your needs

    Configuration

  • Linter


    View the list of available linter rules

    Rules list

  • Formatter


    View the list of available formatters

    Formatters list

Installation¶

pip install robotframework-robocop

Usage¶

Lint the Robot Framework files with:

robocop check

Example output:

> robocop check --reports rules_by_error_type test.robot

test.robot:26:13 DEPR02 'Continue For Loop' is deprecated since Robot Framework version 5.*, use 'CONTINUE' instead
    |
 24 |     FOR    ${var}  IN RANGE  10
 25 |         WHILE    $var
 26 |             Continue For Loop
    |             ^^^^^^^^^^^^^^^^^ DEPR02
 27 |             Continue For Loop If  $var > 10
 28 |             Exit For Loop If  $var < 0
    |

test.robot:28:1 SPC14 Variable in Variables section is not left aligned
   |
 1 | *** Variables ***
 2 | ${VAR} 1
 3 |  ${VAR}  1
   | ^ SPC14
 4 |   ${VAR}  1
 5 | VALUE  1

Found 2 issues: 1 ERRORs, 1 WARNINGs, 0 INFO.

Format the Robot Framework files with:

robocop format
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.