From: Ben Kochie Date: Mon, 30 May 2022 10:51:26 +0000 (+0200) Subject: Update yamllint (#916) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fbbe03965a547cabdfb6782f65eedd08712acce7;p=blackbox_exporter.git Update yamllint (#916) * Include upstream yamllint config. * Fix linting consistency issues. Signed-off-by: SuperQ --- 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: