odoo-lint
Blazing fast Rust-native linter for Odoo modules. The command is called odl.
It checks Python files, manifests, XML and CSV data files and translation
(.po) files, with the checks of OCA's pylint-odoo, oca-checks-odoo-module
and oca-checks-po: same names, same messages, same results on their own
test suites. It also warns about files that do not belong in a module, such
as packages or database dumps committed by accident.
Linting all of OCA/sale-workflow 18.0, as OCA's pre-commit hook runs pylint-odoo. See benchmarks.
- โก 250x faster than pylint with pylint-odoo, and still 30x faster on a
single core
- โ๏ธ Drop-in for pylint-odoo and OCA's pre-commit checks: same codes,
names and messages, 95/95 checks matching on their own test suites (Python,
manifests, XML,
.po), and # pylint: disable= comments keep working
- ๐ง Automatic fixes, safe and unsafe as in Ruff, for Python, manifests,
XML and
.po files (odl check --fix, --diff to preview)
- โฌ๏ธ Upgrade checks: leftovers of older Odoo versions, such as Bootstrap 4
classes that do nothing since Odoo 15.0, with fixes
- ๐ Translation checks that predict Odoo's loader: why Odoo logs
"malformed po file", and why a translation does not show up
- ๐ฆ Installable with pip, uv or pipx: one binary in prebuilt wheels for
Linux, macOS and Windows, without Python dependencies
- ๐ ๏ธ Configured in
pyproject.toml, including company-specific author
rules
- ๐ Output for CI: GitHub annotations, GitLab Code Quality, SARIF and
JSON
- โ๏ธ In your editor: a language server (
odl server) with quick fixes,
and extensions for VS Code and Zed
- ๐ค For AI coding agents: an MCP server, and plugins for Claude Code,
DeepSeek Harness and OpenCode that lint every file the agent edits
- ๐ช Git hooks: pre-commit and hk
Installation
uv tool install odoo-linter
cargo install odoo-lint
The PyPI package is called odoo-linter, because odoo-lint is too similar
to an existing PyPI project. On crates.io it is odoo-lint.
Quick start
odl check path/to/addons
odl rule
odl rule C8101
odl check --fix
Rules ported from pylint-odoo keep its codes, names and messages, and
# pylint: disable= comments keep working. Company-specific rules are
configured in your pyproject.toml:
[tool.odoo-lint]
target-version = "17.0"
[tool.odoo-lint.rules.manifest-required-author.mapping]
"acme_*" = "Acme Corp"
For AI coding agents there is an MCP server (odl mcp) and a post-edit hook,
packaged as plugins for Claude Code (/plugin marketplace add bosd/odoo-lint),
DeepSeek Harness and OpenCode.
See the documentation for all commands,
configuration options and rules.
Development
uv sync --all-groups
uv run nox
See the development guide.
License
MIT