jonasdee commited on
Commit Β·
37e760f
1
Parent(s): 49934ee
enable pre-commit
Browse files- .pre-commit-config.yaml +61 -0
.pre-commit-config.yaml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
repos:
|
| 2 |
+
- repo: https://github.com/psf/black-pre-commit-mirror
|
| 3 |
+
rev: 25.1.0 # Use the latest Black version
|
| 4 |
+
hooks:
|
| 5 |
+
- id: black
|
| 6 |
+
args: ["--diff", "--line-length", "120"] # --check to Enforce check-only mode (no auto-formatting)
|
| 7 |
+
types: [python] # Target Python files
|
| 8 |
+
exclude: .*_pb2.*\.py
|
| 9 |
+
|
| 10 |
+
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
| 11 |
+
rev: v1.5.5
|
| 12 |
+
hooks:
|
| 13 |
+
- id: insert-license
|
| 14 |
+
files: \.py$
|
| 15 |
+
args:
|
| 16 |
+
# - "--remove-header" # Remove existing license headers. Useful when updating license.
|
| 17 |
+
- "--license-filepath"
|
| 18 |
+
- ".github/LICENSE_HEADER.txt"
|
| 19 |
+
- "--use-current-year"
|
| 20 |
+
exclude: |
|
| 21 |
+
(?x)^(
|
| 22 |
+
server/source/genie.sim.lab/genie/sim/lab/app/app_launcher.py|
|
| 23 |
+
server/source/genie.sim.lab/genie/sim/lab/app/ui_builder.py|
|
| 24 |
+
server/source/genie.sim.lab/genie/sim/lab/controllers/parallel_gripper.py|
|
| 25 |
+
robot/isaac_sim/aimdk/
|
| 26 |
+
)$
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 30 |
+
rev: v5.0.0 # Use the ref you want to point at
|
| 31 |
+
hooks:
|
| 32 |
+
- id: trailing-whitespace
|
| 33 |
+
- id: check-added-large-files
|
| 34 |
+
- id: check-ast
|
| 35 |
+
- id: check-json
|
| 36 |
+
- id: check-xml
|
| 37 |
+
- id: check-yaml
|
| 38 |
+
- id: requirements-txt-fixer
|
| 39 |
+
- id: sort-simple-yaml
|
| 40 |
+
- id: pretty-format-json
|
| 41 |
+
args: [--autofix]
|
| 42 |
+
- id: mixed-line-ending
|
| 43 |
+
- id: detect-private-key
|
| 44 |
+
- id: debug-statements
|
| 45 |
+
- id: check-merge-conflict
|
| 46 |
+
- id: check-docstring-first
|
| 47 |
+
- id: check-byte-order-marker # Forbid UTF-8 byte-order markers
|
| 48 |
+
- id: end-of-file-fixer
|
| 49 |
+
|
| 50 |
+
# https://blogs.halodoc.io/code-version-best-practices-with-clean-commit-formats/
|
| 51 |
+
- repo: https://github.com/commitizen-tools/commitizen
|
| 52 |
+
rev: v4.2.0
|
| 53 |
+
hooks:
|
| 54 |
+
- id: commitizen
|
| 55 |
+
stages: [commit-msg]
|
| 56 |
+
args:
|
| 57 |
+
[
|
| 58 |
+
--allowed-prefixes,
|
| 59 |
+
"add,dev,chore,ci,perf,update,fix,feat,docs,refactor,revert,test,format",
|
| 60 |
+
--min-length=10,
|
| 61 |
+
]
|