Add pre-commit configuration file

test
This commit is contained in:
amithkoujalgi
2025-03-11 10:00:11 +05:30
parent 99beb3e6d0
commit 57ecbc2572
2 changed files with 15 additions and 14 deletions

38
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,38 @@
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
# args: ['--branch', 'main']
- 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
- id: check-merge-conflict
- id: pretty-format-json
args: ['--no-sort-keys', '--autofix', '--indent=4']
# 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.6.10
# hooks:
# - id: pmd
# exclude: /test/
# - id: cpd
# exclude: /test/
# - id: checkstyle
# exclude: /test/