mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 03:47:13 +02:00
Add pre-commit configuration file
Introduce a pre-commit-config.yaml to automate code quality checks and enforce best practices. Includes hooks for file validation, formatting, and commit message standardization, as well as Java-specific quality tools. This ensures consistent coding standards and reduces manual errors.
This commit is contained in:
parent
b795117f0a
commit
7756eed9a0
36
pre-commit-config.yaml
Normal file
36
pre-commit-config.yaml
Normal file
@ -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/
|
||||||
|
# ...
|
Loading…
x
Reference in New Issue
Block a user