From dc6e5c104d5bc502283d4c2f99f68fd240de8248 Mon Sep 17 00:00:00 2001 From: Ruben Talstra Date: Thu, 6 Feb 2025 21:10:50 +0100 Subject: [PATCH] exclude files for Initialize CodeQL --- .codeql-config.yml | 6 ++++++ .github/workflows/codeql.yml | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .codeql-config.yml diff --git a/.codeql-config.yml b/.codeql-config.yml new file mode 100644 index 00000000000..82f91d0bbc0 --- /dev/null +++ b/.codeql-config.yml @@ -0,0 +1,6 @@ +paths: + exclude: + - "**/test/**" + - "**/__tests__/**" + - "**/*.spec.*" + - "**/*.test.*" \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 384a4f691ce..3fa6c8a013e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -66,6 +66,8 @@ jobs: with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} + # Use our custom configuration file to exclude test files. + config-file: .codeql-config.yml # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # To add queries to those specified in your config file, prefix the list here with "+" @@ -92,4 +94,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - category: "/language:${{ matrix.language }}" + category: "/language:${{ matrix.language }}" \ No newline at end of file