Merge pull request #21137 from smowton/smowton/admin/reapply-java-xml-paths-filtering

Java: revert revert of `paths` / `paths-ignore` handling in XML and other ancillary extractor
This commit is contained in:
Chris Smowton
2026-01-09 16:22:26 +00:00
committed by GitHub
11 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
paths:
- include
paths-ignore:
- include/exclude

View File

@@ -0,0 +1 @@
public class ShouldAppear2 { }

View File

@@ -0,0 +1 @@
<tag></tag>

View File

@@ -0,0 +1 @@
public class ShouldNotAppear3 { }

View File

@@ -0,0 +1 @@
public class ShouldNotAppear1 { }

View File

@@ -0,0 +1 @@
<tag></tag>

View File

@@ -0,0 +1,4 @@
javaFiles
| include/ShouldAppear2.java:0:0:0:0 | ShouldAppear2 |
#select
| include/ShouldAppear2.xml:0:0:0:0 | include/ShouldAppear2.xml |

View File

@@ -0,0 +1,5 @@
import os
import os.path
def test(codeql, java):
codeql.database.create(build_mode = "none", codescanning_config = "codescanning-config.yml")

View File

@@ -0,0 +1,6 @@
import java
query predicate javaFiles(File f) { f.isJavaSourceFile() }
from XmlFile f
select f

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* When a code-scanning configuration specifies the `paths:` and/or `paths-ignore:` settings, these are now taken into account by the Java extractor's search for XML and properties files.