Skip to content

Commit

Permalink
Update yamllint (#916)
Browse files Browse the repository at this point in the history
* Include upstream yamllint config.
* Fix linting consistency issues.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ authored May 30, 2022
1 parent 6b655cd commit fbbe039
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
28 changes: 28 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions config/testdata/blackbox-good.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fbbe039

Please sign in to comment.