diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml new file mode 100644 index 0000000..839c949 --- /dev/null +++ b/pre-commit-config.yaml @@ -0,0 +1,36 @@ +repos: + + # pre-commit hooks + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: "v5.0.0" + hooks: + - id: check-added-large-files + - id: no-commit-to-branch + - id: check-toml + - id: check-yaml + - id: check-json + - id: check-xml + - id: end-of-file-fixer + exclude: \.json$ + files: \.py$ + - id: trailing-whitespace + - id: mixed-line-ending + + # for commit message formatting + - repo: https://github.com/commitizen-tools/commitizen + rev: v4.1.1 + hooks: + - id: commitizen + stages: [commit-msg] + + # for java code quality + - repo: https://github.com/gherynos/pre-commit-java + rev: v0.2.1 + hooks: + - id: pmd + exclude: /test/ + - id: cpd + exclude: /test/ + - id: checkstyle + exclude: /test/ + # ... \ No newline at end of file