1
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/|
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.*)
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/|
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
+ # You don't usually want a bot to modify your legal texts
16
+ (LICENSE.*|COPYING.*)|
17
+ (\.travis\.yml|\.gitlab\-ci\.yml|\.pre\-commit\-config*\.yaml)|
18
+ # It was ignored from original MQT since that there is not init file
19
+ (/migrations/1[0-4])|
20
+ (/doc/|/docs/)|
21
+ # Legacy modules absa: galaxy
22
+ (galaxy/)|
23
+ # External scripts
24
+ (scripts/)
25
+ )
23
26
default_language_version :
24
27
python : python3
25
- node : " 16.17 .0"
28
+ node : " 14.13 .0"
26
29
repos :
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/sbidoul/whool
42
- rev : v0.5
43
- hooks :
44
- - id : whool-init
45
- - repo : https://github.com/oca/maintainer-tools
46
- rev : d5fab7ee87fceee858a3d01048c78a548974d935
30
+ - repo : https://github.com/PyCQA/flake8
31
+ rev : 6.1.0
47
32
hooks :
48
- # update the NOT INSTALLABLE ADDONS section above
49
- - id : oca-update-pre-commit-excluded-addons
50
- - id : oca-fix-manifest-website
51
- args : ["https://github.com/OCA/hr-expense"]
52
- - id : oca-gen-addon-readme
53
- args :
54
- - --addons-dir=.
55
- - --branch=17.0
56
- - --org-name=OCA
57
- - --repo-name=hr-expense
58
- - --if-source-changed
59
- - --keep-source-digest
60
- - --convert-fragments-to-markdown
61
- - id : oca-gen-external-dependencies
62
- - repo : https://github.com/OCA/odoo-pre-commit-hooks
63
- rev : v0.0.25
64
- hooks :
65
- - id : oca-checks-odoo-module
66
- - id : oca-checks-po
67
- - repo : https://github.com/pre-commit/mirrors-prettier
68
- rev : v2.7.1
33
+ - id : flake8
34
+ name : flake8 mandatory checks
35
+ - repo : https://github.com/OCA/pylint-odoo
36
+ rev : v9.0.5
69
37
hooks :
70
- - id : prettier
71
- name : prettier (with plugin-xml)
72
- additional_dependencies :
73
-
74
-
38
+ - id : pylint_odoo
39
+ name : pylint mandatory checks
75
40
args :
76
- - --plugin=@prettier/plugin-xml
77
- files : \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
41
+ # External scripts
42
+ - --disable=R0000
78
43
- repo : https://github.com/pre-commit/mirrors-eslint
79
- rev : v8.24 .0
44
+ rev : v8.51 .0
80
45
hooks :
81
46
- id : eslint
82
- verbose : true
47
+ name : javascript mandatory checks
83
48
args :
84
49
- --color
85
- - --fix
50
+ - --config=.eslintrc.json
51
+ # - --fix
52
+ - repo : local
53
+ hooks :
54
+ - id : name-non-ascii
55
+ name : Use only ASCII (no accents or special characters) for filenames and directory names
56
+ description : It may raise errors on OS without locale settings configured
57
+ entry : Use only ASCII (no accents or special characters) for filenames and directory names
58
+ language : fail
59
+ files : ' [^\x00-\x7F]'
60
+ - id : vx-check-deactivate
61
+ name : deactivate.jinja syntax check.
62
+ description : Validate deactivate.jinja files' syntax.
63
+ entry : vx-check-deactivate
64
+ args : []
65
+ language : python
66
+ types : [jinja]
67
+ files : ^deactivate\.jinja$
86
68
- repo : https://github.com/pre-commit/pre-commit-hooks
87
- rev : v4.3 .0
69
+ rev : v4.5 .0
88
70
hooks :
89
- - id : trailing-whitespace
90
- # exclude autogenerated files
91
- exclude : /README\.rst$|\.pot?$
92
- - id : end-of-file-fixer
93
- # exclude autogenerated files
94
- exclude : /README\.rst$|\.pot?$
95
71
- id : debug-statements
96
- - id : fix-encoding-pragma
97
- args : ["--remove"]
98
72
- id : check-case-conflict
99
73
- id : check-docstring-first
100
74
- id : check-executables-have-shebangs
@@ -103,23 +77,3 @@ repos:
103
77
exclude : /README\.rst$|^docs/.*\.rst$
104
78
- id : check-symlinks
105
79
- id : check-xml
106
- - id : mixed-line-ending
107
- args : ["--fix=lf"]
108
- - repo : https://github.com/astral-sh/ruff-pre-commit
109
- rev : v0.1.3
110
- hooks :
111
- - id : ruff
112
- args : [--fix, --exit-non-zero-on-fix]
113
- - id : ruff-format
114
- - repo : https://github.com/OCA/pylint-odoo
115
- rev : v9.0.4
116
- hooks :
117
- - id : pylint_odoo
118
- name : pylint with optional checks
119
- args :
120
- - --rcfile=.pylintrc
121
- - --exit-zero
122
- verbose : true
123
- - id : pylint_odoo
124
- args :
125
- - --rcfile=.pylintrc-mandatory
0 commit comments