[binutils-gdb] pre-commit: use ^ anchors in `files`
Simon Marchi
simark@sourceware.org
Thu Oct 30 16:27:52 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9f9eeeb6dab692dc0e0d851588dd5a1b6a0eb098
commit 9f9eeeb6dab692dc0e0d851588dd5a1b6a0eb098
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Wed Oct 29 13:49:28 2025 -0400
pre-commit: use ^ anchors in `files`
Some `files` regexes use a ^ anchor, some don't. I think it's good to
be explicit about it (and consistent), so use it everywhere.
Change-Id: I14eb2082a1c0ff6bc219e202fb16c3f12001fd73
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
.pre-commit-config.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 369301254e3..71c898f7c1e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -46,7 +46,7 @@ repos:
hooks:
- id: black
types_or: [file]
- files: 'gdb/.*\.py(\.in)?$'
+ files: '^gdb/.*\.py(\.in)?$'
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
@@ -66,7 +66,7 @@ repos:
hooks:
- id: isort
types_or: [file]
- files: 'gdb/.*\.py(\.in)?$'
+ files: '^gdb/.*\.py(\.in)?$'
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
@@ -103,4 +103,4 @@ repos:
- id: tclint
args: [--config, gdb/tclint.toml]
types_or: [file]
- files: 'gdb/testsuite/.*\.(exp|tcl)$'
+ files: '^gdb/testsuite/.*\.(exp|tcl)$'
More information about the Binutils-cvs
mailing list