mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
# To use:
|
|
#
|
|
# pre-commit run -a
|
|
#
|
|
# Or:
|
|
#
|
|
# pre-commit install # (runs every time you commit in git)
|
|
#
|
|
# To update this file:
|
|
#
|
|
# pre-commit autoupdate
|
|
#
|
|
# See https://github.com/pre-commit/pre-commit
|
|
|
|
exclude: 'vmlinux.py'
|
|
|
|
ci:
|
|
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
autofix_commit_msg: "style: pre-commit fixes"
|
|
|
|
repos:
|
|
# Standard hooks
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: check-added-large-files
|
|
- id: check-case-conflict
|
|
- id: check-merge-conflict
|
|
- id: check-symlinks
|
|
- id: check-yaml
|
|
exclude: ^conda\.recipe/meta\.yaml$
|
|
- id: debug-statements
|
|
- id: end-of-file-fixer
|
|
- id: mixed-line-ending
|
|
- id: requirements-txt-fixer
|
|
- id: trailing-whitespace
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: "v0.13.2"
|
|
hooks:
|
|
- id: ruff
|
|
args: ["--fix", "--show-fixes"]
|
|
- id: ruff-format
|
|
# exclude: ^(docs)|^(tests)|^(examples)
|
|
|
|
# Checking static types
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: "v1.18.2"
|
|
hooks:
|
|
- id: mypy
|
|
exclude: ^(tests)|^(examples)
|
|
additional_dependencies: [types-setuptools]
|
|
|
|
# Changes tabs to spaces
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
|
rev: v1.5.5
|
|
hooks:
|
|
- id: remove-tabs
|
|
exclude: '^(docs)|.*/Makefile$|Makefile$'
|