mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Add test re: buildless mode interaction with snapshot repositories
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.mycompany.app</groupId>
|
||||
<artifactId>my-app</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>snapshot-test-repo</id>
|
||||
<url>http://localhost:9427/snapshots</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.my.snapshot.test</groupId>
|
||||
<artifactId>snapshottest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,24 @@
|
||||
<metadata modelVersion="1.1.0">
|
||||
<groupId>com.github.my.snapshot.test</groupId>
|
||||
<artifactId>snapshottest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<versioning>
|
||||
<lastUpdated>20230101020304</lastUpdated>
|
||||
<snapshot>
|
||||
<timestamp>20230901.050514</timestamp>
|
||||
<buildNumber>100</buildNumber>
|
||||
</snapshot>
|
||||
<snapshotVersions>
|
||||
<snapshotVersion>
|
||||
<extension>jar</extension>
|
||||
<value>1.0-20230901.050514-100</value>
|
||||
<updated>20230101020304</updated>
|
||||
</snapshotVersion>
|
||||
<snapshotVersion>
|
||||
<extension>pom</extension>
|
||||
<value>1.0-20230901.050514-100</value>
|
||||
<updated>20230101020304</updated>
|
||||
</snapshotVersion>
|
||||
</snapshotVersions>
|
||||
</versioning>
|
||||
</metadata>
|
||||
@@ -0,0 +1 @@
|
||||
cf2064037098dc6d4294ef6f1a12dc75
|
||||
@@ -0,0 +1 @@
|
||||
aeabf1dbf735290f5317d78459b3219d267dbb0e
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
dbb202adb2f6c5504c9b29b93610dd9e
|
||||
@@ -0,0 +1 @@
|
||||
6db6f637a68116728830d5610cbafb608bc58a21
|
||||
@@ -0,0 +1,13 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.github.my.snapshot.test</groupId>
|
||||
<artifactId>snapshottest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
66c5f73407153610dc3f5743eef678f3
|
||||
@@ -0,0 +1 @@
|
||||
f895a88d2490dbcec8228c2a528bde029d80409e
|
||||
@@ -0,0 +1,7 @@
|
||||
import testpkg.DepClass;
|
||||
|
||||
public class Test {
|
||||
|
||||
DepClass dc;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
diagnostics
|
||||
#select
|
||||
| DepClass |
|
||||
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
|
||||
from create_database_utils import *
|
||||
import subprocess
|
||||
|
||||
repo_server_process = subprocess.Popen(["python3", "-m", "http.server", "9427"], cwd = "repo")
|
||||
|
||||
try:
|
||||
run_codeql_database_create([], lang="java", extra_args=["--extractor-option=buildless=true"], extra_env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true"})
|
||||
finally:
|
||||
repo_server_process.kill()
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import java
|
||||
import semmle.code.java.Diagnostics
|
||||
|
||||
query predicate diagnostics(Diagnostic d) { any() }
|
||||
|
||||
from Class c
|
||||
where c.getName() = "DepClass"
|
||||
select c.toString()
|
||||
Reference in New Issue
Block a user