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-robocopVerified import paths — ran on the pinned version, not inferred.
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.
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.
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`.
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.
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.