github.com/aws-cloudformation/cloudformation-cli-go-plugin@v1.2.0/.pre-commit-config.yaml (about) 1 repos: 2 - repo: https://github.com/pre-commit/pre-commit-hooks 3 rev: v4.3.0 4 hooks: 5 - id: check-case-conflict 6 - id: end-of-file-fixer 7 - id: mixed-line-ending 8 args: 9 - --fix=lf 10 - id: trailing-whitespace 11 - id: pretty-format-json 12 args: 13 - --autofix 14 - --indent=4 15 - --no-sort-keys 16 exclude: cfn/test/data/request.read.invalid.json 17 - id: check-merge-conflict 18 - id: check-yaml 19 - repo: https://github.com/pre-commit/mirrors-isort 20 rev: v5.10.1 21 hooks: 22 - id: isort 23 - repo: https://github.com/ambv/black 24 rev: 22.10.0 25 hooks: 26 - id: black 27 - repo: https://github.com/pycqa/flake8 28 rev: '5.0.4' 29 hooks: 30 - id: flake8 31 additional_dependencies: 32 - flake8-bugbear>=19.3.0 33 - flake8-builtins>=1.4.1 34 - flake8-commas>=2.0.0 35 - flake8-comprehensions>=2.1.0 36 - flake8-debugger>=3.1.0 37 - flake8-pep3101>=1.2.1 38 # language_version: python3.6 39 exclude: templates/ 40 - repo: https://github.com/pre-commit/pygrep-hooks 41 rev: v1.9.0 42 hooks: 43 - id: python-check-blanket-noqa 44 - id: python-check-mock-methods 45 - id: python-no-log-warn 46 - repo: https://github.com/PyCQA/bandit 47 rev: "1.7.4" 48 hooks: 49 - id: bandit 50 files: ^python/ 51 additional_dependencies: 52 - "importlib-metadata<5" # https://github.com/PyCQA/bandit/issues/956 53 - repo: local 54 hooks: 55 - id: pylint-local 56 name: pylint-local 57 description: Run pylint in the local virtualenv 58 entry: pylint "setup.py" "python/" "tests/" 59 language: system 60 # ignore all files, run on hard-coded modules instead 61 pass_filenames: false 62 always_run: true 63 - id: pytest-local 64 name: pytest-local 65 description: Run pytest in the local virtualenv 66 entry: > 67 pytest 68 --cov-report=term 69 --cov-report=html 70 --cov="rpdk.go" 71 --durations=5 72 "tests/" 73 language: system 74 # ignore all files, run on hard-coded modules instead 75 pass_filenames: false 76 always_run: true 77 - repo: https://github.com/dnephin/pre-commit-golang 78 rev: v0.5.1 79 hooks: 80 - id: go-fmt 81 # - id: go-vet 82 - id: go-imports 83 - id: go-cyclo 84 args: [-over=20] 85 - id: golangci-lint 86 - id: go-critic 87 - id: go-unit-tests 88 - id: go-build 89 - id: go-mod-tidy