Skip to content
robotframework-lint

Lint the edit, not the review.

A Robot Framework language server and auto-fix hook for coding agents. Findings arrive as one short line each, and safe fixes are applied before the agent reads them.

Agent setup guide

tests/login.robot | after the agent's edit

  1. *** Test Cases ***
  2. Valid Login
  3. VAR ${user} alice scope=TEST
  4. Open Login Page
  5. IF $user Submit Credentials ${user}

hook Set Test Variable -> VAR, IF block -> inline IF (no agent turn) lsp LEN03 Keyword 'Open Login Page' has too many keywords inside (12/10)

Fewer issues left, measured.

Lint issues left per run on one task: write two Robot suites and run them. Haiku, 25 runs per arm. Every run passed its tests.

robotframework-lint LSP v6other arms

No LSP

18.5
$0.028 / run

Robocop MCP

13.2
$0.036 / run

robotframework-lint LSP

4.7
$0.034 / run

At medium effort the LSP cost less than the MCP on Haiku, Sonnet and Opus, and left the same or fewer issues. All versions, models and the harness.

Two parts, one loop.

Auto-fix hook

After every Edit or Write on a .robot or .resource file, robotframework-lint-autofix runs robocop's safe fixes: Set Test Variable and Create List become VAR, old [Return] and Run Keyword If become RETURN and IF, one assignment style per file. It prints nothing and never blocks the edit.

Language server

robotframework-lint-lsp lints the buffer with the robocop defaults plus six RF 7.5 rules. It sends warnings and errors only, at most 20 per file, one line each, and answers keyword definition, references, hover and symbols.

SettingDefaultWhat it does
maxDiagnostics20Findings per file, then one overflow line with the count cut.
minSeveritywarningFloor: info, warning or error. Fixable Info rules are raised to warning.
select, ignore[]Robocop rule ids to keep or drop.
groupFindingsfalseOne diagnostic per rule. Off: it left more findings unfixed in tests.

What you need, and where it runs.

Needs

  • Python 3.10 or later
  • Robot Framework 7.5.1
  • Robocop 9.4.0

Agents

  • Claude Code: plugin with LSP and hook
  • opencode and crush: lsp config
  • Codex: through an LSP to MCP bridge

Setup for each agent

Editors

  • Any LSP client over stdio
  • Command robotframework-lint-lsp
  • Language id robotframework