1+ exclude : |
2+ (?x)
3+ # NOT INSTALLABLE ADDONS
4+ # END NOT INSTALLABLE ADDONS
5+ # Files and folders generated by bots, to avoid loops
6+ ^setup/|/static/description/index\.html$|
7+ # We don't want to mess with tool-generated files
8+ .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
9+ # Maybe reactivate this when all README files include prettier ignore tags?
10+ ^README\.md$|
11+ # Library files can have extraneous formatting (even minimized)
12+ /static/(src/)?lib/|
13+ # Repos using Sphinx to generate docs don't need prettying
14+ ^docs/_templates/.*\.html$|
15+ # Don't bother non-technical authors with formatting issues in docs
16+ readme/.*\.(rst|md)$|
17+ # Ignore build and dist directories in addons
18+ /build/|/dist/|
19+ # Ignore test files in addons
20+ /tests/samples/.*|
21+ # You don't usually want a bot to modify your legal texts
22+ (LICENSE.*|COPYING.*)
23+ default_language_version :
24+ python : python3
25+ node : " 14.13.0"
126repos :
2- - repo : https://github.com/pre-commit/mirrors-prettier
3- rev : v2.4.1
27+ - repo : local
28+ hooks :
29+ # These files are most likely copier diff rejection junks; if found,
30+ # review them manually, fix the problem (if needed) and remove them
31+ - id : forbidden-files
32+ name : forbidden files
33+ entry : found forbidden files; remove them
34+ language : fail
35+ files : " \\ .rej$"
36+ - id : en-po-files
37+ name : en.po files cannot exist
38+ entry : found a en.po file
39+ language : fail
40+ files : ' [a-zA-Z0-9_]*/i18n/en\.po$'
41+ - repo : https://github.com/oca/maintainer-tools
42+ rev : f9b919b9868143135a9c9cb03021089cabba8223
43+ hooks :
44+ # update the NOT INSTALLABLE ADDONS section above
45+ - id : oca-update-pre-commit-excluded-addons
46+ - id : oca-fix-manifest-website
47+ args : ["https://github.com/trevi-software/trevi-misc"]
48+ - id : oca-gen-addon-readme
49+ args :
50+ - --addons-dir=.
51+ - --branch=14.0
52+ - --org-name=trevi-software
53+ - --repo-name=trevi-misc
54+ - --if-source-changed
55+ - --keep-source-digest
56+ - repo : https://github.com/OCA/odoo-pre-commit-hooks
57+ rev : v0.0.25
58+ hooks :
59+ - id : oca-checks-odoo-module
60+ - id : oca-checks-po
61+ args :
62+ - --disable=po-pretty-format
63+ - repo : https://github.com/myint/autoflake
64+ rev : v1.5.3
65+ hooks :
66+ - id : autoflake
67+ args :
68+ - --expand-star-imports
69+ - --ignore-init-module-imports
70+ - --in-place
71+ - --remove-all-unused-imports
72+ - --remove-duplicate-keys
73+ - --remove-unused-variables
74+ - repo : https://github.com/psf/black
75+ rev : 22.3.0
76+ hooks :
77+ - id : black
78+ - repo : local
479 hooks :
580 - id : prettier
6- # https://github.com/prettier/prettier/issues/12143
7- exclude : " }$"
81+ name : prettier (with plugin-xml)
82+ entry : prettier
83+ args :
84+ - --write
85+ - --list-different
86+ - --ignore-unknown
87+ types : [text]
88+ files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
89+ language : node
90+ additional_dependencies :
91+ - " prettier@2.1.2"
92+ - " @prettier/plugin-xml@0.12.0"
93+ - repo : local
94+ hooks :
95+ - id : eslint
96+ name : eslint
97+ entry : eslint
98+ args :
99+ - --color
100+ - --fix
101+ verbose : true
102+ types : [javascript]
103+ language : node
104+ additional_dependencies :
105+ - " eslint@7.8.1"
106+ - " eslint-plugin-jsdoc@"
107+ - " globals@"
8108 - repo : https://github.com/pre-commit/pre-commit-hooks
9109 rev : v4.5.0
10110 hooks :
@@ -20,10 +120,36 @@ repos:
20120 args : ["--remove"]
21121 - id : mixed-line-ending
22122 args : ["--fix=lf"]
23- - id : trailing-whitespace
24- - repo : https://github.com/astral-sh/ruff-pre-commit
25- rev : v0.1.3
123+ - repo : https://github.com/asottile/pyupgrade
124+ rev : v2.7.2
125+ hooks :
126+ - id : pyupgrade
127+ args : ["--keep-percent-format"]
128+ - repo : https://github.com/PyCQA/isort
129+ rev : 5.12.0
130+ hooks :
131+ - id : isort
132+ name : isort except __init__.py
133+ args :
134+ - --settings=.
135+ exclude : /__init__\.py$
136+ - repo : https://github.com/acsone/setuptools-odoo
137+ rev : 3.3.2
138+ hooks :
139+ - id : setuptools-odoo-make-default
140+ - id : setuptools-odoo-get-requirements
141+ args :
142+ - --output
143+ - requirements.txt
144+ - --header
145+ - " # generated from manifests external_dependencies"
146+ - repo : https://github.com/PyCQA/flake8
147+ rev : 5.0.0
148+ hooks :
149+ - id : flake8
150+ name : flake8
151+ additional_dependencies : ["flake8-bugbear==20.1.4"]
152+ - repo : https://github.com/OCA/pylint-odoo
153+ rev : 7.0.2
26154 hooks :
27- - id : ruff
28- args : [--exit-non-zero-on-fix]
29- - id : ruff-format
155+ - id : pylint_odoo
0 commit comments