mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
16810e455f
This adds flake8 and isort to .pre-commit-config.yaml. This way, they will automatically be run on commit. I chose the most recent available versions after verifying that they don't cause any reports or changes in the current tree. Internally at AdaCore, we also use a few flake8 plugins as well, so perhaps that's another avenue for investigation. v2: Also update the various file-selection clauses to pick up gdb-gdb.py.in; include the isort change made to this file; and finally add a comment about the exclusions from flake8. Approved-By: Simon Marchi <simon.marchi@efficios.com>
25 lines
691 B
YAML
25 lines
691 B
YAML
# 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.3.0
|
|
hooks:
|
|
- id: black
|
|
types_or: [file]
|
|
files: 'gdb/.*\.py(\.in)?$'
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: 7.0.0
|
|
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)?$'
|