Add integration test for paths and paths-ignore vs. Java buildless mode#21049
Merged
smowton merged 2 commits intogithub:mainfrom Jan 6, 2026
Merged
Conversation
1c05889 to
b91f9ac
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new integration test to verify that the paths and paths-ignore configuration options work correctly with Java buildless mode. The test ensures that only files from specified paths are included in the analysis while explicitly excluded paths are ignored.
- Adds a test configuration that includes files from
include/directory while excluding files frominclude/exclude/subdirectory - Creates test data files in both included and excluded paths to validate filtering behavior
- Verifies that only files matching the path criteria are analyzed and appear in query results
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
java/ql/integration-tests/java/buildless-paths/test.ql |
Query file that tests for Java source files and XML files to validate path filtering |
java/ql/integration-tests/java/buildless-paths/test.py |
Test script that creates a database with buildless mode and applies the codescanning config |
java/ql/integration-tests/java/buildless-paths/test.expected |
Expected output showing only files from include/ directory (excluding the exclude/ subdirectory) |
java/ql/integration-tests/java/buildless-paths/codescanning-config.yml |
Configuration file defining path inclusion and exclusion patterns |
java/ql/integration-tests/java/buildless-paths/sibling/ShouldNotAppear1.xml |
Test data file outside included paths that should be filtered out |
java/ql/integration-tests/java/buildless-paths/sibling/ShouldNotAppear1.java |
Test data file outside included paths that should be filtered out |
java/ql/integration-tests/java/buildless-paths/include/exclude/ShouldNotAppear3.xml |
Test data file in explicitly excluded path that should be filtered out |
java/ql/integration-tests/java/buildless-paths/include/exclude/ShouldNotAppear3.java |
Test data file in explicitly excluded path that should be filtered out |
java/ql/integration-tests/java/buildless-paths/include/ShouldAppear2.xml |
Test data file that should appear in results based on path filters |
java/ql/integration-tests/java/buildless-paths/include/ShouldAppear2.java |
Test data file that should appear in results based on path filters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+2
| import os | ||
| import os.path |
There was a problem hiding this comment.
The imports for os and os.path are not used in this test file and should be removed.
Suggested change
| import os | |
| import os.path |
3c730c2 to
6fb6923
Compare
nickrolfe
approved these changes
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expected failure; requires concurrent internal PR.