-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add integration test for paths and paths-ignore vs. Java buildless mode #21049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add integration test for paths and paths-ignore vs. Java buildless mode #21049
Conversation
1c05889 to
b91f9ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| import os | ||
| import os.path |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports for os and os.path are not used in this test file and should be removed.
| import os | |
| import os.path |
Expected failure; requires concurrent internal PR.