@@ -5,13 +5,19 @@ exclude: |
5
5
# Files and folders generated by bots, to avoid loops
6
6
^setup/|/static/description/index\.html$|
7
7
# We don't want to mess with tool-generated files
8
- .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
8
+ .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
9
9
# Maybe reactivate this when all README files include prettier ignore tags?
10
10
^README\.md$|
11
11
# Library files can have extraneous formatting (even minimized)
12
12
/static/(src/)?lib/|
13
13
# Repos using Sphinx to generate docs don't need prettying
14
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/.*|
15
21
# You don't usually want a bot to modify your legal texts
16
22
(LICENSE.*|COPYING.*)
17
23
default_language_version :
@@ -33,14 +39,29 @@ repos:
33
39
language : fail
34
40
files : ' [a-zA-Z0-9_]*/i18n/en\.po$'
35
41
- repo : https://github.com/oca/maintainer-tools
36
- rev : dfba427ba03900b69e0a7f2c65890dc48921d36a
42
+ rev : d5fab7ee87fceee858a3d01048c78a548974d935
37
43
hooks :
38
44
# update the NOT INSTALLABLE ADDONS section above
39
45
- id : oca-update-pre-commit-excluded-addons
40
46
- id : oca-fix-manifest-website
41
47
args : ["https://github.com/OCA/connector"]
48
+ - id : oca-gen-addon-readme
49
+ args :
50
+ - --addons-dir=.
51
+ - --branch=15.0
52
+ - --org-name=OCA
53
+ - --repo-name=connector
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
42
63
- repo : https://github.com/myint/autoflake
43
- rev : v1.4
64
+ rev : v1.5.3
44
65
hooks :
45
66
- id : autoflake
46
67
args :
@@ -54,25 +75,35 @@ repos:
54
75
rev : 22.3.0
55
76
hooks :
56
77
- id : black
57
- - repo : https://github.com/pre-commit/mirrors-prettier
58
- rev : v2.4.1
78
+ - repo : local
59
79
hooks :
60
80
- id : prettier
61
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
62
90
additional_dependencies :
63
91
- " prettier@2.4.1"
64
92
- " @prettier/plugin-xml@1.1.0"
65
- args :
66
- - --plugin=@prettier/plugin-xml
67
- files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
68
- - repo : https://github.com/pre-commit/mirrors-eslint
69
- rev : v7.32.0
93
+ - repo : local
70
94
hooks :
71
95
- id : eslint
72
- verbose : true
96
+ name : eslint
97
+ entry : eslint
73
98
args :
74
99
- --color
75
100
- --fix
101
+ verbose : true
102
+ types : [javascript]
103
+ language : node
104
+ additional_dependencies :
105
+ - " eslint@v7.32.0"
106
+ - " eslint-plugin-jsdoc@"
76
107
- repo : https://github.com/pre-commit/pre-commit-hooks
77
108
rev : v4.0.1
78
109
hooks :
@@ -119,13 +150,13 @@ repos:
119
150
- --header
120
151
- " # generated from manifests external_dependencies"
121
152
- repo : https://github.com/PyCQA/flake8
122
- rev : 3.9.2
153
+ rev : 5.0.0
123
154
hooks :
124
155
- id : flake8
125
156
name : flake8
126
157
additional_dependencies : ["flake8-bugbear==21.9.2"]
127
158
- repo : https://github.com/OCA/pylint-odoo
128
- rev : 7.0.2
159
+ rev : 7.0.5
129
160
hooks :
130
161
- id : pylint_odoo
131
162
name : pylint with optional checks
0 commit comments