Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #20 from copier-org/pre-commit-update
Browse files Browse the repository at this point in the history
build: pre-commit update template
  • Loading branch information
yajo authored Jan 25, 2022
2 parents a136935 + 3d8a796 commit 3968c89
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 86 deletions.
9 changes: 5 additions & 4 deletions .copier-answers.autopretty.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changes here will be overwritten by Copier; do NOT edit manually
_commit: v0.1.0a8
_commit: v0.2.1-1-g886ab6a
_src_path: .
ansible: true
ansible: false
biggest_kbs: 1000
github: true
js: true
js: false
main_branches:
- main
python: true
python: false
terraform: false
72 changes: 4 additions & 68 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,72 +11,16 @@ repos:
language: fail
files: "\\.rej$"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
rev: v2.5.1
hooks:
- id: prettier
additional_dependencies:
- prettier@2.1.2
- "@prettier/plugin-xml@0.12.0"
- prettier@2.5.1
- "@prettier/plugin-xml@1.2.0"
args:
- --plugin=@prettier/plugin-xml
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.17.0
hooks:
- id: eslint
verbose: true
args:
- --color
- --fix
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --expand-star-imports
- --ignore-init-module-imports
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
hooks:
- id: isort
args:
- --settings=.
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- &flake8
id: flake8
name: flake8 except __init__.py
exclude: /__init__\.py$
additional_dependencies:
- flake8-bugbear==20.1.4
- <<: *flake8
name: flake8 for __init__.py
args:
# ignore unused imports in __init__.py
- --extend-ignore=F401
files: /__init__\.py$
- repo: https://github.com/IamTheFij/ansible-pre-commit
rev: v0.1.2
hooks:
- id: encryption-check
- repo: https://github.com/ansible/ansible-lint
rev: v4.3.7
hooks:
- id: ansible-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.1.0
hooks:
- id: check-added-large-files
args:
Expand All @@ -95,11 +39,3 @@ repos:
args:
- --fix=lf
- id: trailing-whitespace
- id: check-ast
- id: check-builtin-literals
- id: check-docstring-first
- id: debug-statements
- id: fix-encoding-pragma
args:
- --remove
- id: requirements-txt-fixer
28 changes: 14 additions & 14 deletions src/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ repos:
(with the activated plugin), which are too common as to ask the user,
although it's true that it will also format JS, HTML, CSS and others #}
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
rev: v2.5.1
hooks:
- id: prettier
additional_dependencies:
- prettier@2.1.2
- "@prettier/plugin-xml@0.12.0"
- prettier@2.5.1
- "@prettier/plugin-xml@1.2.0"
args:
- --plugin=@prettier/plugin-xml
{%- if js %}
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.17.0
rev: v8.7.0
hooks:
- id: eslint
verbose: true
Expand All @@ -45,34 +45,34 @@ repos:
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
rev: v2.31.0
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.12b0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==20.8b1
- black==21.12b0
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
rev: 5.10.1
hooks:
- id: isort
args:
- --settings=.
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- &flake8
id: flake8
name: flake8 except __init__.py
exclude: /__init__\.py$
additional_dependencies:
- flake8-bugbear==20.1.4
- flake8-bugbear==22.1.11
- <<: *flake8
name: flake8 for __init__.py
args:
Expand All @@ -90,24 +90,24 @@ repos:
hooks:
- id: tfsec
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.62.1
rev: v1.62.3
hooks:
- id: terraform_fmt
- id: terraform_providers_lock
- id: terraform_validate
{%- endif %}
{%- if ansible %}
- repo: https://github.com/IamTheFij/ansible-pre-commit
rev: v0.1.2
rev: v1.0.0
hooks:
- id: encryption-check
- repo: https://github.com/ansible/ansible-lint
rev: v4.3.7
rev: v5.3.2
hooks:
- id: ansible-lint
{%- endif %}
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.1.0
hooks:
{%- if biggest_kbs %}
- id: check-added-large-files
Expand Down

0 comments on commit 3968c89

Please sign in to comment.