odoo-lint

io.github.GetFluvo由 GitHub 账号 GetFluvo 发布v0.1.0-alpha.21更新于 Nov 7, 2026

Lint and fix Odoo addons: pylint-odoo and OCA checks, translation files and upgrades.

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

让 AI 助手使用 odoo-lint 的 pylint-odoo 与 OCA 兼容检查来检查和修复 Odoo 附加模块,包括翻译与升级问题。

可以做什么
  • 检查 Odoo 模块:对 Python、清单、XML、CSV、.po 和 JavaScript 文件运行 pylint-odoo 与 OCA 兼容规则
  • 列出并解释规则,包括翻译为何无法加载或残留旧版本写法
  • 应用或预览对 Python、清单、XML 和 .po 文件的自动修复
  • 提示不应出现在模块中的文件,例如误提交的软件包或数据库转储
  • 以适合 CI 的格式输出结果,如 GitHub 注解、GitLab Code Quality、SARIF 和 JSON
适用场景
适合在助手编辑或审查 Odoo 附加模块代码时使用,可在对话中直接发现 lint、翻译和升级问题,或应用安全修复。
运行要求
以本地进程通过 stdio 运行,使用 uvx 从 PyPI 包 odoo-linter 启动(也可用 pip、pipx 或 cargo 安装)。未声明认证、环境变量或请求头。仅限桌面端。
安装前请注意
自动修复会改动附加模块目录中的文件,应用前请先查看差异;README 区分安全与不安全修复。未声明任何凭据或网络访问需求。

安装

在 SourceWeft 中

  1. 打开 控制台中的 odoo-lint,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[odoo-lint logo]

odoo-lint

[PyPI] [crates.io] [Tests] [OCA parity] [Documentation] [License: MIT]

Blazing fast Rust-native linter for Odoo modules. The command is called odl.

It checks Python files, manifests, XML and CSV data files, translation (.po) files and JavaScript (OWL components and templates), 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.

[Bar chart: linting OCA/sale-workflow takes 0.10s with odoo-lint and 25.8s with pylint-odoo]

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, every check matching on their own test suites (parity), 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

bash
uv tool install odoo-linter   # or: pipx install odoo-lintercargo install odoo-lint       # from crates.io

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

bash
odl check path/to/addons   # lint a directoryodl rule                   # list all rulesodl rule C8101             # explain a ruleodl check --fix            # apply the safe fixes (--diff to preview)

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:

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 GetFluvo/odoo-lint), DeepSeek Harness and OpenCode.

New to odoo-lint? Start with Getting started; coming from OCA's pre-commit hooks, read Migrating from OCA's tooling. See the documentation for all commands, configuration options and rules.

Development

bash
uv sync --all-groups   # builds odl into .venv via maturinuv run nox             # pre-commit, fmt, clippy, cargo tests, CLI tests, docs

See CONTRIBUTING.md and the development guide.

License

MIT

来源:README.md,提交 db0d18b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0-alpha.21最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分