Skip to main content

A comprehensive linting tool for Odoo modules

Project description

Odoolint

Odoolint is a comprehensive linting tool designed specifically for Odoo modules. It helps developers maintain code quality and consistency across their Odoo projects by performing various checks on Python files, XML files, and other web assets.

Features

  • Python code style checking using Flake8
  • XML ID duplication detection within Odoo modules
  • End-of-file newline validation for various file types

Installation

You can install Odoolint using pip:

pip install odoolint

Usage

Run Odoolint from the command line in your Odoo project directory:

odoolint

Odoolint will automatically look for a .odoolint configuration file in the current directory. If no configuration file is found, default settings will be used.

Configuration

Create a .odoolint file in YAML format in your project's root directory to customize Odoolint's behavior. Here's an example configuration:

flake8_select: "C,E,F,W,B,B9,N801,N803"
flake8_ignore: "E203,E501,W503,C901,W605,E722,E731"
flake8_exclude:
  - "**unported**"
  - "**__init__.py"
  - "tests"
check_file_types:
  - ".xml"
  - ".js"
  - ".css"
  - ".scss"
  - ".csv"

Configuration Options

  • flake8_select: Comma-separated list of error codes to check for in Python files.
  • flake8_ignore: Comma-separated list of error codes to ignore in Python files.
  • flake8_exclude: List of file or directory patterns to exclude from checks.
  • check_file_types: List of file extensions to check for end-of-file newlines.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoolint-1.0.9.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

odoolint-1.0.9-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file odoolint-1.0.9.tar.gz.

File metadata

  • Download URL: odoolint-1.0.9.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for odoolint-1.0.9.tar.gz
Algorithm Hash digest
SHA256 2c7d12870e7f1d71db129aa3208515110d70879fb61ceb2cd2f12da486eb0e4c
MD5 441aea6a3f66eeb2ed15292b1e098b50
BLAKE2b-256 1561119c3950089624ce98509f0cef3ba93af80f49a51529708ea00d0c30d8d1

See more details on using hashes here.

File details

Details for the file odoolint-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: odoolint-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for odoolint-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b5212159faaccf61497a48de9984066cb788be9b423275c888a1c2aaffa9c6e4
MD5 4b222dcbcae67f226fb58cdc9babb0f9
BLAKE2b-256 150abce7298422612a5721a2671e95b9f842060d74f4eb2f7bee14ed1e286ab7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page