From 28c25351c111a921e167f530833b35a542b7ebd8 Mon Sep 17 00:00:00 2001
From: Peter Leitzen <pleitzen@gitlab.com>
Date: Wed, 14 Dec 2022 11:37:26 +0100
Subject: [PATCH] yamllint: Lint more YAML extensions

Match YAML files with any ending and exclude extension which are known
to break yamllint. For example, *.erb, *.gz, *.bz2.

The following files are checked additionally:
- ./config/secrets.yml.example
- ./config/database.yml.postgresql
- ./config/resque.yml.example
- ./config/cable.yml.example
- ./config/gitlab.yml.example
- ./config/database.yml.decomposed-postgresql
- ./config/sidekiq.yml.example
- ./.solargraph.yml.example
---
 .yamllint | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/.yamllint b/.yamllint
index 4a9dd9c56bd4e..5b49a617a57de 100644
--- a/.yamllint
+++ b/.yamllint
@@ -2,6 +2,15 @@
 
 extends: default
 
+yaml-files:
+  # defaults
+  - '*.yaml'
+  - '*.yml'
+  - '.yamllint'
+  # match more extensions
+  - '*.yaml.*'
+  - '*.yml.*'
+
 # Ideally, we should have nothing in this ignore section.
 #
 # Please consider removing entries below by fixing them.
@@ -19,6 +28,16 @@ ignore: |
   # Broken on purpose (for testing)
   spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml
 
+  # Dynamic YAML files have syntax errors sometimes.
+  *.erb
+
+  # Vim temporary files.
+  *.sw[pon]
+
+  # Zipped files (by e.g. asset pipeline)
+  *.gz
+  *.bz2
+
   #### Folders ####
   node_modules/
   tmp/
-- 
GitLab