diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..7cb15abe --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,59 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + args: ["--maxkb=1024"] + - id: detect-private-key + - id: check-merge-conflict + - id: no-commit-to-branch + args: [--branch, develop, --branch, main] + + + # - repo: local +# hooks: +# - id: coding-standard-fixer +# name: PHP coding standards Fixer test +# language: script +# entry: ./scripts/coding-standard-fixer.sh +# stages: [commit] +# +# - repo: local +# hooks: +# - id: coding-standard +# name: Check the PHP and Prestashop coding standards +# language: script +# entry: ./scripts/coding-standard.sh +# stages: [commit] +# +# - repo: local +# hooks: +# - id: php-compatibility +# name: Check the PHP compatibility +# language: script +# entry: ./scripts/php-compatibility.sh +# stages: [commit] +# +# - repo: https://github.com/returntocorp/semgrep +# rev: v1.27.0 +# hooks: +# - id: semgrep +# args: +# - --error +# - --config +# - semgrep/rules/ +# - --metrics +# - "off" +# - --quiet +# - --disable-version-check +# - --skip-unknown-extensions +# pass_filenames: false # Passing files explicitely override semgremignore + + - repo: https://github.com/alma/pre-commit-hooks + rev: 1.1.2 + hooks: + - id: check-branch-name + args: + - "-r^((chore|ci|dependabot|devx|docs|feature|fix|hotfix|hotfix-backport|infra|other|perf|refactor|security|test)\/.+|(snyk)-.+|main|develop|HEAD)$$" \ No newline at end of file