From fbbe03965a547cabdfb6782f65eedd08712acce7 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Mon, 30 May 2022 12:51:26 +0200 Subject: [PATCH] Update yamllint (#916) * Include upstream yamllint config. * Fix linting consistency issues. Signed-off-by: SuperQ --- .yamllint | 28 ++++++++++++++++++++++++++++ config/testdata/blackbox-good.yml | 6 +++--- example.yml | 14 +++++++------- 3 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 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 diff --git a/config/testdata/blackbox-good.yml b/config/testdata/blackbox-good.yml index 59304d4..6260b83 100644 --- a/config/testdata/blackbox-good.yml +++ b/config/testdata/blackbox-good.yml @@ -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 diff --git a/example.yml b/example.yml index 458c290..2e40a02 100644 --- a/example.yml +++ b/example.yml @@ -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: -- 2.25.1