[PATCH 2/2] [pre-commit] Add yamllint hook

Tom de Vries <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
Add pre-commit check linting .pre-commit-config.yaml using yamllint.

[1] https://github.com/adrienverge/yamllint
---
 .pre-commit-config.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 957c896e66e..e07b9b99620 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -98,6 +98,13 @@ repos:
         args: [--trust-plugins]
         files: '^gdb/testsuite/.*\.(exp|tcl)$'
 
+  # Yaml hooks.
+  - repo: https://github.com/adrienverge/yamllint.git
+    rev: v1.38.0
+    hooks:
+      - id: yamllint
+        files: '^\.pre-commit-config.yaml$'
+
   # Local hooks.
   - repo: local
     hooks:
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.