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 分