mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-03 18:10:42 +01:00 
			
		
		
		
	Introduces a new local hook 'format-code' that runs 'make apply-formatting' to ensure code formatting is applied automatically during pre-commit. The hook is set to always run.
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
repos:
 | 
						|
 | 
						|
  # pre-commit hooks
 | 
						|
  - repo: https://github.com/pre-commit/pre-commit-hooks
 | 
						|
    rev: "v6.0.0"
 | 
						|
    hooks:
 | 
						|
      - id: no-commit-to-branch
 | 
						|
        args: ['--branch', 'main']
 | 
						|
      - id: check-merge-conflict
 | 
						|
      - id: check-added-large-files
 | 
						|
      - id: check-yaml
 | 
						|
      - id: check-xml
 | 
						|
      - id: check-json
 | 
						|
      - id: pretty-format-json
 | 
						|
        args: ['--no-sort-keys', '--autofix', '--indent=4']
 | 
						|
      - id: end-of-file-fixer
 | 
						|
        exclude: \.json$
 | 
						|
        files: \.java$|\.xml$
 | 
						|
      - id: trailing-whitespace
 | 
						|
      - id: mixed-line-ending
 | 
						|
 | 
						|
  # for commit message formatting
 | 
						|
  - repo: https://github.com/commitizen-tools/commitizen
 | 
						|
    rev: v4.9.1
 | 
						|
    hooks:
 | 
						|
      - id: commitizen
 | 
						|
        stages: [commit-msg]
 | 
						|
 | 
						|
  - repo: local
 | 
						|
    hooks:
 | 
						|
      - id: format-code
 | 
						|
        name: Format Code
 | 
						|
        entry: make apply-formatting
 | 
						|
        language: system
 | 
						|
        always_run: true
 | 
						|
 | 
						|
#  # 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/
 |