-
Notifications
You must be signed in to change notification settings - Fork 10
/
.pre-commit-config.yaml
61 lines (60 loc) · 2.16 KB
/
.pre-commit-config.yaml
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
52
53
54
55
56
57
58
59
60
61
# Git has the notion of hooks, which are custom scripts that are run on
# specific events. One of these hooks is the pre-commit hook (located at
# .git/hooks/pre-commit), which is run when committing, before specifying a
# message.
#
# To ease management of the pre-commit hook, the pre-commit framework
# ( https://pre-commit.com ) was developed. This is the configuration file
# for that framework. It contains a list of hooks, with information on where
# to find them and on which files to run them.
#
# See here ( https://pre-commit.com/#install ) on how to install the
# pre-commit framework.
#
# To run all the hooks specified in this file manually, you can do:
# $ pre-commit run
#
# To run some hooks and skip others, you can use environment variable SKIP:
# $ SKIP=flake8,isort pre-commit run
#
# To install the pre-commit framework in the repository in order to run the
# hooks on every commit, do:
# $ pre-commit install
#
# After installing the pre-commit framework, you can skip running all
# pre-commit hooks using --no-verify, or some using SKIP.
# $ git commit --no-verify ...
# $ SKIP=flake8,isort git commit ...
#
# In case some of these hooks don't work for you, you can make the SKIP
# setting permanent by:
# - setting SKIP in your environment
# (this will affect all repositories where it is set)
# - setting SKIP in .git/hooks/pre-commit by adding "export SKIP=..."
# (this will affect only this repository, but it may have to be re-added
# if .git/hooks/pre-commit is regenerated)
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
types_or: [file]
files: 'gdb/.*\.py(\.in)?$'
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
types_or: [file]
# Note this one is only run on gdb/python, not (for now) the
# test suite.
files: 'gdb/python/.*\.py(\.in)?$'
args: [--config, gdb/setup.cfg]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
types_or: [file]
files: 'gdb/.*\.py(\.in)?$'