public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add flake8 and isort to .pre-commit-config.yaml
@ 2024-04-02 18:11 Tom Tromey
  2024-04-02 20:26 ` Simon Marchi
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2024-04-02 18:11 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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.
---
 .pre-commit-config.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7afe60c20be..bca8acc5d02 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,3 +6,14 @@ repos:
     hooks:
       - id: black
         files: 'gdb/.*'
+  - repo:  https://github.com/pycqa/flake8
+    rev: 7.0.0
+    hooks:
+    - id: flake8
+      files: gdb/python/.*\.py$
+      args: [--config, gdb/setup.cfg]
+  - repo: https://github.com/pycqa/isort
+    rev: 5.13.2
+    hooks:
+    - id: isort
+      files: gdb/.*\.py$
-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-10  5:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 18:11 [PATCH] Add flake8 and isort to .pre-commit-config.yaml Tom Tromey
2024-04-02 20:26 ` Simon Marchi
2024-04-03 19:52   ` Tom Tromey
2024-04-03 19:57     ` Simon Marchi
2024-04-09  7:58       ` Tom de Vries
2024-04-09  9:41         ` Kévin Le Gouguec
2024-04-09 12:56           ` Tom de Vries
2024-04-09 13:04             ` Kévin Le Gouguec
2024-04-09 15:22         ` Tom Tromey
2024-04-10  5:38           ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).