Update yamllint (#916)
authorBen Kochie <superq@gmail.com>
Mon, 30 May 2022 10:51:26 +0000 (12:51 +0200)
committerGitHub <noreply@github.com>
Mon, 30 May 2022 10:51:26 +0000 (11:51 +0100)
* Include upstream yamllint config.
* Fix linting consistency issues.

Signed-off-by: SuperQ <superq@gmail.com>
.yamllint [new file with mode: 0644]
config/testdata/blackbox-good.yml
example.yml

diff --git a/.yamllint b/.yamllint
new file mode 100644 (file)
index 0000000..3878a31
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,28 @@
+---
+extends: default
+
+rules:
+  braces:
+    max-spaces-inside: 1
+    level: error
+  brackets:
+    max-spaces-inside: 1
+    level: error
+  commas: disable
+  comments: disable
+  comments-indentation: disable
+  document-start: disable
+  indentation:
+    spaces: consistent
+    indent-sequences: consistent
+  key-duplicates:
+    ignore: |
+      config/testdata/section_key_dup.bad.yml
+  line-length: disable
+  truthy:
+    ignore: |
+      .github/workflows/codeql-analysis.yml
+      .github/workflows/funcbench.yml
+      .github/workflows/fuzzing.yml
+      .github/workflows/prombench.yml
+      .github/workflows/golangci-lint.yml
index 59304d4439a695bdc30cd7492074013f8f407f17..6260b8359c09445fda16908f03fbba471f4a1bc2 100644 (file)
@@ -75,6 +75,6 @@ modules:
       headers:
         Origin: example.com
       fail_if_header_not_matches:
-        - header: Access-Control-Allow-Origin
-          regexp: '(\*|example\.com)'
-          allow_missing: false
+      - header: Access-Control-Allow-Origin
+        regexp: '(\*|example\.com)'
+        allow_missing: false
index 458c290f4bc51bbea34a9cb7e3c5d72af91c60f5..2e40a02ff714ccb3637636784d47351c00cdd1c6 100644 (file)
@@ -120,22 +120,22 @@ modules:
       query_name: "www.prometheus.io"
       query_type: "A"
       valid_rcodes:
-      - NOERROR
+        - NOERROR
       validate_answer_rrs:
         fail_if_matches_regexp:
-        - ".*127.0.0.1"
+          - ".*127.0.0.1"
         fail_if_all_match_regexp:
-        - ".*127.0.0.1"
+          - ".*127.0.0.1"
         fail_if_not_matches_regexp:
-        - "www.prometheus.io.\t300\tIN\tA\t127.0.0.1"
+          - "www.prometheus.io.\t300\tIN\tA\t127.0.0.1"
         fail_if_none_matches_regexp:
-        - "127.0.0.1"
+          - "127.0.0.1"
       validate_authority_rrs:
         fail_if_matches_regexp:
-        - ".*127.0.0.1"
+          - ".*127.0.0.1"
       validate_additional_rrs:
         fail_if_matches_regexp:
-        - ".*127.0.0.1"
+          - ".*127.0.0.1"
   dns_soa:
     prober: dns
     dns: