From caeae861fc294a839fb828db93d9e88d394930e1 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 4 Jul 2024 19:50:02 +0200 Subject: [PATCH] add test for skipping a linter --- .github/workflows/tools.yaml | 5 +++++ test/tools/tool1/.lint_skip | 1 + 2 files changed, 6 insertions(+) create mode 100644 test/tools/tool1/.lint_skip diff --git a/.github/workflows/tools.yaml b/.github/workflows/tools.yaml index 32fd645..7096818 100644 --- a/.github/workflows/tools.yaml +++ b/.github/workflows/tools.yaml @@ -182,6 +182,11 @@ jobs: continue-on-error: true - name: check if all test tools were linted run: | + set -x + # check if the ToolIDValid linter is called (no of tools - 1 ) times, i.e. is skipped once + if [ "$(grep -c ToolIDValid ToolIDValid) != "2" ]; then + echo "expecting exactly 2 tests for ToolIDValid"; exit 1; + fi grep tool1 lint_report.txt grep tool2 lint_report.txt grep "ERROR: Error 'HTTPConnectionPool" lint_report.txt diff --git a/test/tools/tool1/.lint_skip b/test/tools/tool1/.lint_skip new file mode 100644 index 0000000..780125a --- /dev/null +++ b/test/tools/tool1/.lint_skip @@ -0,0 +1 @@ +ToolIDValid \ No newline at end of file