-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from acsone/v14-and-stuff-sbi
Various improvements to project template
- Loading branch information
Showing
6 changed files
with
97 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 77 additions & 83 deletions
160
acsoo/templates/project/+project.name+/.pre-commit-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,81 @@ | ||
exclude: "^(?!odoo/)|.pot$|.po$" | ||
default_language_version: | ||
python: python3 | ||
node: "14.13.0" | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/prettier/prettier | ||
rev: 2.0.2 | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- "@prettier/[email protected]" | ||
args: | ||
- --plugin=@prettier/plugin-xml | ||
files: "\\.(\ | ||
css|less|scss\ | ||
|graphql|gql\ | ||
|html\ | ||
|js|jsx\ | ||
|json\ | ||
|md|markdown|mdown|mkdn\ | ||
|mdx\ | ||
|ts|tsx\ | ||
|vue\ | ||
|yaml|yml\ | ||
|xml\ | ||
)$" | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v6.8.0 | ||
hooks: | ||
- id: eslint | ||
verbose: true | ||
args: | ||
- --color | ||
- --fix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: flake8 | ||
name: flake8 except __init__.py | ||
args: [--exclude=__init__.py] | ||
additional_dependencies: [ | ||
"flake8-bugbear==19.8.0", | ||
"flake8-per-file-ignores==0.8.1", | ||
] | ||
- id: flake8 | ||
name: flake8 only __init__.py | ||
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py | ||
files: __init__.py | ||
- id: fix-encoding-pragma | ||
args: ["--remove"] | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
# exclude files where underlines are not distinguishable from merge conflicts | ||
exclude: /README\.rst$|^docs/.*\.rst$ | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v2.3.1 | ||
hooks: | ||
- id: pylint | ||
name: pylint odoo | ||
# check only specific Odoo addons | ||
files: odoo/addons/ | ||
types: ['file', 'python'] # to not check .csv and .conf files | ||
args: [] | ||
additional_dependencies: [pylint-odoo==3.1.0] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.26.2 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.21 | ||
hooks: | ||
- id: isort | ||
name: isort except __init__.py | ||
exclude: /__init__\.py$ | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: ["-i", "--ignore-init-module-imports"] | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.2.1 | ||
hooks: | ||
- id: prettier | ||
name: prettier + plugin-xml | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "@prettier/[email protected]" | ||
args: | ||
- --plugin=@prettier/plugin-xml | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v7.14.0 | ||
hooks: | ||
- id: eslint | ||
verbose: true | ||
args: | ||
- --color | ||
- --fix | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: fix-encoding-pragma | ||
args: ["--remove"] | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
# exclude files where underlines are not distinguishable from merge conflicts | ||
exclude: /README\.rst$|^docs/.*\.rst$ | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: mixed-line-ending | ||
args: ["--fix=lf"] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
name: flake8 except __init__.py | ||
exclude: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- id: flake8 | ||
name: flake8 only __init__.py | ||
args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py | ||
files: /__init__\.py$ | ||
additional_dependencies: ["flake8-bugbear==19.8.0"] | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v2.6.0 | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
files: odoo/addons/ | ||
args: [] | ||
additional_dependencies: [pylint-odoo==3.5.0] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.7.4 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.6.4 | ||
hooks: | ||
- id: isort | ||
name: isort except __init__.py | ||
exclude: /__init__\.py$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters