代码拉取完成,页面将自动刷新
exclude: "^semgrep/tests/e2e/(targets|snapshots)|semgrep-core/tests|.*\\.md"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^semgrep/tests/.+$
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-case-conflict
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: fix-byte-order-marker
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.6
hooks:
- id: reorder-python-imports
args: [--py36-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.790"
hooks:
- id: mypy
exclude: ^semgrep\/tests\/.+$|^setup.py$|^scripts\/.+$$
args: [--config, mypy.ini, --show-error-codes]
- id: mypy
alias: mypy-test
name: mypy (test files)
files: ^semgrep\/tests\/.+$
args: [--config, mypy-tests.ini, --show-error-codes]
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.4"
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear==20.1.4"]
args: ["--select=B,E9,F63,F7,F82"]
- repo: https://github.com/returntocorp/semgrep
rev: 'v0.31.1'
hooks:
- id: semgrep
name: Semgrep Python
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
args: ['--config', 'https://semgrep.dev/p/python', '--error']
- id: semgrep
name: Semgrep Bandit
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
args: ['--config', 'https://semgrep.dev/p/bandit', '--error']
- id: semgrep
name: Semgrep Local
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
# Managed at https://semgrep.dev/mschwager:semgrep-local
args: ['--config', 'https://semgrep.dev/mschwager:semgrep-local', '--error']
- repo: local
hooks:
- id: shellcheck
name: shellcheck
language: docker_image
entry: koalaman/shellcheck:v0.7.1
files: "[.]sh$"
- repo: local
hooks:
- id: hadolint
name: hadolint
language: docker_image
files: "Dockerfile"
entry: hadolint/hadolint:v1.18.0 hadolint
args: ["--ignore", "DL3008", "--ignore", "DL3018"]
# Run develop semgrep. Only used in CI
# To run locally use `pre-commit run --hook-stage manual semgrep-docker-develop`
- repo: https://github.com/returntocorp/semgrep
rev: 'v0.32.0'
hooks:
- id: semgrep-docker-develop
name: Semgrep Develop Python
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
args: ['--config', 'https://semgrep.dev/p/python', '--error']
stages: [manual]
- id: semgrep-docker-develop
name: Semgrep Develop Bandit
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
args: ['--config', 'https://semgrep.dev/p/bandit', '--error']
stages: [manual]
- id: semgrep-docker-develop
name: Semgrep Develop Local
types: [python]
exclude: "^semgrep/tests/.+$|^scripts/.+$|^semgrep/setup.py$"
# Managed at https://semgrep.dev/mschwager:semgrep-local
args: ['--config', 'https://semgrep.dev/mschwager:semgrep-local', '--error']
stages: [manual]
# Re-indent OCaml code (ml, mli) with ocp-indent if ocp-indent is
# present. If ocp-indent is missing, this step will succeed.
# This allows pure python users to run 'pre-commit run --all' without
# installing opam and ocp-indent.
#
- repo: local
hooks:
- id: lint-ocaml
name: Re-indent OCaml code
entry: ./scripts/lint-ocaml
language: script
files: "\\.mli?$"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。