You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2025/09/29 14:50:50 UTC

(lucene) branch main updated: ci: further tune the codeql (#15254)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new c461774b9c2 ci: further tune the codeql (#15254)
c461774b9c2 is described below

commit c461774b9c200b54ab3e25e2518cade462ba308f
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Sep 29 10:50:44 2025 -0400

    ci: further tune the codeql (#15254)
    
    Some of the security-extended checks were actually useful, it only has
    one extremely noisy rule, just like the default queries have one
    extremely noisy rule.
    
    Disable both of the noisy rules via configuration file instead.
---
 .github/codeql-config.yml    | 10 ++++++++++
 .github/workflows/codeql.yml |  6 ++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml
new file mode 100644
index 00000000000..e803cf59ae7
--- /dev/null
+++ b/.github/codeql-config.yml
@@ -0,0 +1,10 @@
+---
+query-filters:
+  - exclude:
+      # Very noisy check which can also be accomplished with an ordinary linter.
+      # See: https://codeql.github.com/codeql-query-help/java/java-implicit-cast-in-compound-assignment/
+      id: java/implicit-cast-in-compound-assignment
+  - exclude:
+      # Very noisy check which can also be accomplished with an ordinary linter.
+      # See: https://codeql.github.com/codeql-query-help/java/java-comparison-with-wider-type/
+      id: java/comparison-with-wider-type
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 5199863871a..d74868762ef 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -27,13 +27,10 @@ jobs:
         include:
           - language: actions
             build-mode: none
-            queries: security-extended
           - language: python
             build-mode: none
-            queries: security-extended
           - language: java
             build-mode: none
-            queries: "" # security-extended is very noisy for the java language
     steps:
       - name: Checkout repository
         uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -49,7 +46,8 @@ jobs:
         with:
           languages: ${{ matrix.language }}
           build-mode: ${{ matrix.build-mode }}
-          queries: ${{ matrix.queries }}
+          queries: security-extended
+          config-file: ./.github/codeql-config.yml
 
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3