Registry / testing / robotframework-robocop

robotframework-robocop

JSON →
library9.0.0pypypi✓ verified 24d ago

Robocop is a static code analysis tool (linter) and code formatter specifically designed for Robot Framework. It uses the official Robot Framework parsing API to analyze files and enforce code quality standards and formatting. Currently at version 8.2.5, the library maintains an active development status with regular minor/patch releases and impactful major version updates approximately once a year.

pip install -U robotframework-robocop
INSTALL
IMPORT
SIG · ROBOTFRAMEWORK-ROB
R
robotframework-robocop
testingpythonv9.0.0
Install
7.9s avg
Import
Disk
47MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 47.3MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.9s · import 0.000s · 48MB
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VisitorChecker
from robocop.checkers import VisitorChecker
Primary use is via CLI; this import is for extending Robocop with custom rules. Direct programmatic use for end-user linting/formatting is less common.

Robocop is primarily a command-line interface (CLI) tool. The most common way to use it is by running `robocop check` for linting or `robocop format` for code formatting in your project directory.

# To lint Robot Framework files in the current directory: robocop check # To format Robot Framework files in the current directory: robocop format # To lint a specific file: robocop check path/to/your_file.robot # To format a specific file: robocop format path/to/your_file.robot # For help with available commands and options: robocop -h
robocop --version
Debug
Known issues
breakingVersion 8.0.0 dropped support for Python 3.9 and Robot Framework 4. Ensure your environment meets the new requirements (Python 3.10+, Robot Framework 5.0+).
fix
Upgrade Python to 3.10+ and Robot Framework to 5.0+. If you must lint Robot Framework 4 code with Robocop 8.0.0+, ensure Robocop is installed in a compatible environment and use the `--target-version RF4` option to simulate RF4 parsing rules.
affects: >=8.0.0
breakingIn version 8.0.0, the `deprecated-statement` rule was split and removed, and the `ReplaceReturns` and `AddMissingEnd` formatters were deprecated/removed. Your configurations might need updating.
fix
Remove `deprecated-statement`, `ReplaceReturns`, and `AddMissingEnd` from your Robocop configuration. New rules replace the functionality of `deprecated-statement`, and automatic fixes are now available for `deprecated-return-keyword`.
affects: >=8.0.0
gotchaMajor version updates (e.g., to 8.0.0) can break compatibility with IDE plugins like RobotCode due to internal API changes. Check for updated plugin versions if you encounter issues.
fix
Update your IDE's Robot Framework plugin (e.g., RobotCode) to a version compatible with Robocop 8.0.0+. Consult the plugin's documentation or issue tracker for compatibility details.
affects: >=8.0.0
gotchaRobocop supports multiple configuration methods (`.robocop` file, `pyproject.toml`, `--argumentfile` CLI option). Understand the precedence rules to avoid unexpected behavior.
fix
Configuration is loaded from `.robocop` (if no CLI args are given) or `pyproject.toml` (`[tool.robocop]` section) if `.robocop` is not found and `toml` is installed. CLI options explicitly override file configurations. The closest configuration file to the scanned target is used. Use `robocop -h` for details on command-line options and configuration loading.
affects: All versions
Upgrade
Version history
9.0.0latest on PyPI · released Aug 26, 2026
Audit
Dependencies
PythonrequiredRequires Python 3.10 or newer.
Robot FrameworkrequiredRequires Robot Framework 5.0 or newer.
Agent activity
7 hits · last 30 days
node
6
Resources
robotframework-robocop — pip install robotframework-robocop · libregistry