-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml.template
More file actions
51 lines (46 loc) · 1.42 KB
/
.pre-commit-config.yaml.template
File metadata and controls
51 lines (46 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Python Code Harmonizer - Pre-commit Hook Template
#
# Copy this file to .pre-commit-config.yaml in your project root
# Install pre-commit: pip install pre-commit
# Install hooks: pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-python-syntax
# Python Code Formatting
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
language_version: python3
# Python Linting
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
# Python Code Harmonizer (Semantic Analysis)
- repo: local
hooks:
- id: harmonizer
name: Python Code Harmonizer
entry: harmonizer
language: system
types: [python]
pass_filenames: true
# Note: Install harmonizer first: pip install /path/to/Python-Code-Harmonizer
# Usage Notes:
# - This checks code harmony before every commit
# - To skip temporarily: git commit --no-verify
# - To run manually: pre-commit run harmonizer --all-files
#
# Customization:
# - Adjust 'pass_filenames: false' to check all files every time
# - Add 'args: ["--threshold", "0.8"]' when threshold support is added