Skip to main content

robotframework-lint-lsp

Robot Framework lint for coding agents, built and tested as a Claude Code plugin. The agent edits a .robot file. Safe fixes are applied right after the edit. Only the findings left come back to the agent, one short line each.

PyPI Python License: MIT

  • Language server (robotframework-lint-lsp): robocop findings plus the RFL rules below, sent after every edit. It also gives definition, references, hover and workspace symbols for your own keywords.
  • Auto-fix hook (robotframework-lint-autofix): after each Edit or Write, it applies robocop's safe fixes. These cover DEPR03 to DEPR11, MISC04, MISC09, VAR01 and RFL001, for example Set Test Variable to VAR. The agent spends no turns on them. After an Edit, the hook fixes only the lines the edit wrote, so untouched lines stay out of the diff. After a Write, it fixes the whole file.
  • Rule pack: seven rules that robocop 9.4.0 does not check, each from a Robot Framework release note or the User Guide (see Rules below).

The PyPI package and the plugin are named robotframework-lint-lsp. The Python module is robotframework_lint.

Contents

Does it help?

Measured on one task (write two suites with keywords, then run them): robocop 9.4.0 default findings left in the final files, and cost per run. Three runs per arm at medium effort, so read these as direction:

Model No lint robocop MCP This plugin Cost against no lint
Haiku 17.3 13.7 4.7 +10% ($0.030 to $0.033)
Sonnet 12.0 2.7 2.0 +9% ($0.171 to $0.186)
Opus 11.0 0 0 +57% ($0.251 to $0.395)

The plugin leaves the same or fewer findings than the robocop MCP and costs less than it on all three models. A larger Haiku run used 25 runs per arm at default effort. It left 18.5 findings with no lint, 13.2 with the MCP and 4.7 with the plugin. There the plugin cost 21% more than no lint. These runs used plugin commit c84eb65 with up to 20 findings per file. Every run, version and chart: benchmarks (source).

Install

Needs Python 3.10 or later, uv (or pipx) and Claude Code 2.1.275 or later. It lints projects on Robot Framework 7.x: the hook writes VAR, which needs RF 7.0, and RFL002 to RFL006 report RF 7.5 deprecations.

Each step has the result to expect.

  1. Install the server commands:

    uv tool install robotframework-lint-lsp==1.3.3
    

    Or: pipx install robotframework-lint-lsp==1.3.3.

    Expected: exit code 0, and the output names robotframework-lint-lsp and robotframework-lint-autofix. The tool has its own environment, separate from your project's robotframework, and pins robotframework 7.5.1, robotframework-robocop 9.4.0 and pygls 2.1.1.

  2. Check that the server command is on PATH:

    which robotframework-lint-lsp      # Windows: where robotframework-lint-lsp
    

    Expected: one path. If nothing prints, add the folder that uv tool dir --bin prints to PATH (pipx: pipx ensurepath) and open a new terminal. The plugin runs the bare command, so it fails without this.

  3. Add the marketplace and install the plugin:

    claude plugin marketplace add ai94iq/robotframework-lint-lsp
    claude plugin install robotframework-lint-lsp@robotframework-lint-lsp --scope user
    claude plugin list
    

    Expected: a row for robotframework-lint-lsp with Status: enabled. If the marketplace is already added, continue.

  4. Reload the plugins: run /reload-plugins in Claude Code, or restart it.

  5. Check both parts. Under a test case in any .robot file, add:

        Set Test Variable    ${x}    1
    

    Expected: the hook rewrites the line to VAR ${x} 1 scope=TEST. Then add Library Telnet to the file's *** Settings *** section. Expected: the edit result or the next tool result has RFL002 Telnet is deprecated since RF 7.5; use TelnetLibrary. Diagnostics are pushed, so they can arrive one tool result late, and a finding already delivered is not shown again. If the line is not rewritten, the hook is not running. If no RFL002 line comes, the server is not running. Check step 2, then step 3, then reload again.

    With a debug log, claude --debug-file debug.log, both parts show in grep -E "LSP Diagnostics: Delivering|robotframework-lint-autofix" debug.log.

If you are an agent installing this

Follow the Install steps in order. If a result does not match the expected one, stop and report the output to the user. Do not change the user's PATH or shell profile without their approval. In step 2, ask the user to add the folder. An agent cannot run /reload-plugins: in step 4, ask the user to reload and wait for their confirmation before step 5.

What the agent gets

Feature Behaviour
Diagnostics On open, save and change (debounced 0.4 s). One line per finding, RULEID message, at most 120 characters. By default, warnings and errors only, and at most 9 per file, then one line saying how many more were cut. Claude Code shows the first 10 diagnostics of a file, so the default leaves room for that line.
Fix hints A finding from a rule the hook fixes (DEPR03 to DEPR11, MISC04, MISC09, VAR01, RFL001) ends with fix all: <command>. The hint is for lines the agent did not edit. Info rules on that list are raised to Warning so the agent sees them.
Auto-fix The PostToolUse hook runs robocop's safe fixes on a temp copy of the edited file. It keeps your line endings and applies the fixes only to the lines an Edit wrote. If the file changed while robocop ran, it writes nothing.
Navigation Definition and references matched the way Robot matches names (say_hello finds Say Hello); hover shows the signature and first doc line; workspace symbols rank exact, then prefix, then substring. At most 50 results. The server builds the keyword index in the background on start. Its limits are in docs/agents.md.

When a file has more findings than the limit, findings on lines changed since git HEAD come first. A finding on an unchanged line reads RULEID (old) message. The full order is in docs/agents.md.

Settings

The plugin passes these in initializationOptions of its .lsp.json, in the plugin folder: ~/.claude/plugins/cache/robotframework-lint-lsp/robotframework-lint-lsp/<version>/.lsp.json. A plugin update installs a new version folder, so edits there are lost. To choose rules, use your project's robocop config instead (below).

Option Default Meaning
maxDiagnostics 9 Findings per file before the overflow line
minSeverity warning info, warning or error
select all rules Report only these rule IDs
ignore none Rule IDs to drop
robotcodeCommand unset Command list for robotcode in a project venv; see below

The project's own robocop.toml, or [tool.robocop.lint] in pyproject.toml, narrows the rules for its files through select and ignore. How it combines with the options above is in docs/agents.md.

robotcodeCommand, for example ["D:/proj/.venv/Scripts/robotcode"], adds on save up to 5 errors robocop cannot see: unresolved keywords, variables and imports. Without it, a call to a keyword that does not exist is not reported, because robocop does not resolve keywords. robotcode runs on the saved file in your workspace, not a temp copy, and imports your project's libraries. In the plugin's .lsp.json, it applies to every workspace you open. Set it only while you work on one project whose code you trust. A venv without that project's libraries reports false import errors.

Rules

ID Name What it reports Source
RFL001 for-in-zip-without-mode FOR ... IN ZIP without mode. The hook adds mode=SHORTEST, which keeps the current behaviour RF 7.0
RFL002 deprecated-standard-library Library Telnet RF 7.5
RFL003 deprecated-tag-pattern XORY and & in tag patterns RF 7.5
RFL004 deprecated-translation French Unités de test, Finnish Tagit RF 7.5
RFL005 doc-tags-without-empty-row Tags: in keyword docs RF 7.5
RFL006 deprecated-argument-name list_=, time_= RF 7.5
RFL007 local-shadows-suite-variable ${contract}= that hides ${CONTRACT} from the same file's Variables section; imported resources are not checked User Guide, Variables

RFL007 is an error by this tool's choice, not by the User Guide. The guide recommends capitals for non-local variables and lowercase for local ones. Variable names are case-insensitive, so the local assignment replaces the suite value. The guide does not forbid this.

RFL003 uses Robot Framework's own TagPatterns. It flags the same patterns RF 7.5.1 warns about. This includes all-caps tags such as -DONOTX, which RF reads as DO NOT X. RFL004 reports a term only when RF parsed it as a header or setting, that is, in a French or Finnish file.

To lint from the command line, with the RFL rules:

uv tool run --from robotframework-lint-lsp==1.3.3 robocop check --custom-rules robotframework_lint path/to/tests

robocop list rules has no --custom-rules flag. To list the RFL rules, put custom_rules = ["robotframework_lint"] under [tool.robocop.lint] in a config file and run robocop list rules --config <file>.

Other agents and editors

docs/agents.md gives the setup for opencode, Crush, Codex and any LSP client. It also covers the GLM coding plan, a model plan that runs inside those tools, and how to call the hook from other hook systems. Only Claude Code is tested end to end. That page gives the status of each other setup.

Development

# Windows: use .venv/Scripts/python in both commands
python -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"
.venv/bin/python -m pytest

Releases publish to PyPI from a GitHub release through trusted publishing (.github/workflows/release.yml).

License

MIT

Metadata

Release files for robotframework-lint-lsp 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-lint-lsp 1.3.3
File Size Uploaded Provenance Actions
robotframework_lint_lsp-1.3.3.tar.gz 54.8 kB With provenance Details for robotframework_lint_lsp-1.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-lint-lsp 1.3.3
File Interpreter ABI Platform Actions
robotframework_lint_lsp-1.3.3-py3-none-any.whl Python 3 none any Details for robotframework_lint_lsp-1.3.3-py3-none-any.whl

Total release size: 91.2 kB

Release files / robotframework_lint_lsp-1.3.3.tar.gz

Download URL robotframework_lint_lsp-1.3.3.tar.gz
Size 54.8 kB
Tags Source
SHA-256 checksum
How to use checksums
44a5d2619a7ab4614249e6c9debd13ef286923a3b34a10b90ed86666bd336857
BLAKE2b-256 checksum
How to use checksums
f310d0a070599893c1b749b167592048037aa5969c1a120297aa729a792a6aec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / robotframework_lint_lsp-1.3.3-py3-none-any.whl

Download URL robotframework_lint_lsp-1.3.3-py3-none-any.whl
Size 36.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a505946163a05ec24a521a72b0153641d3e43a0e046a86696a7b00dae72fad6
BLAKE2b-256 checksum
How to use checksums
f23c36338de43c26755d304db38e6833d0ace973fa7e7ded27a200279d788036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for robotframework-lint-lsp 1.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for robotframework_lint_lsp-1.3.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page