Merge pull request #13879 from github/starcke/automodel-pack

Create separate automodel pack
This commit is contained in:
Anders Starcke Henriksen
2023-08-30 13:24:25 +02:00
committed by GitHub
49 changed files with 61 additions and 10 deletions

View File

@@ -4,6 +4,8 @@ provide:
- "*/ql/test/qlpack.yml"
- "*/ql/examples/qlpack.yml"
- "*/ql/consistency-queries/qlpack.yml"
- "*/ql/automodel/src/qlpack.yml"
- "*/ql/automodel/test/qlpack.yml"
- "shared/*/qlpack.yml"
- "cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml"
- "go/ql/config/legacy-support/qlpack.yml"

View File

@@ -1,7 +1,7 @@
#!/bin/sh
set -e
SOLORIGATE_ROOT="$(dirname $0)"
SOLORIGATE_ROOT="$(readlink -f "$(dirname $0)")"
WORKSPACE_ROOT="$SOLORIGATE_ROOT/../../../.."
GRPS="solorigate,-test"

28
java/ql/automodel/publish.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
set -e
AUTOMODEL_ROOT="$(readlink -f "$(dirname $0)")"
WORKSPACE_ROOT="$AUTOMODEL_ROOT/../../.."
GRPS="automodel,-test"
if [ -z "$CODEQL_DIST" ]; then
echo "CODEQL_DIST not set"
exit -1
fi
cd "$AUTOMODEL_ROOT"
echo Testing automodel queries
"${CODEQL_DIST}/codeql" test run test
cd "$WORKSPACE_ROOT"
echo Preparing release
"${CODEQL_DIST}/codeql" pack release --groups $GRPS
echo Publishing automodel
"${CODEQL_DIST}/codeql" pack publish --groups $GRPS
echo Bumping versions
"${CODEQL_DIST}/codeql" pack post-release --groups $GRPS
echo Automodel packs successfully published. Please commit and push the version changes.

View File

@@ -1,5 +1,5 @@
extensions:
- addsTo:
pack: codeql/java-queries
pack: codeql/java-automodel-queries
extensible: automodelCandidateFilter
data: []

View File

@@ -0,0 +1,10 @@
name: codeql/java-automodel-queries
version: 0.0.3-dev
groups:
- java
- automodel
dependencies:
codeql/java-all: ${workspace}
dataExtensions:
- AutomodelCandidateFilter.yml
warnOnImplicitThis: true

View File

@@ -0,0 +1 @@
AutomodelApplicationModeExtractCandidates.ql

View File

@@ -0,0 +1 @@
AutomodelApplicationModeExtractNegativeExamples.ql

View File

@@ -0,0 +1 @@
AutomodelApplicationModeExtractPositiveExamples.ql

View File

@@ -0,0 +1 @@
AutomodelFrameworkModeExtractCandidates.ql

View File

@@ -0,0 +1 @@
AutomodelFrameworkModeExtractNegativeExamples.ql

View File

@@ -0,0 +1 @@
AutomodelFrameworkModeExtractPositiveExamples.ql

View File

@@ -0,0 +1,12 @@
name: codeql/java-automodel-tests
version: 0.0.1-dev
groups:
- java
- automodel
- test
dependencies:
codeql/java-all: ${workspace}
codeql/java-automodel-queries: ${workspace}
extractor: java
tests: .
warnOnImplicitThis: true

View File

@@ -27,7 +27,7 @@ class TestLibrary extends RefType {
/** Holds if the given file is a test file. */
private predicate isInTestFile(File file) {
file.getAbsolutePath().matches(["%/test/%", "%/guava-tests/%", "%/guava-testlib/%"]) and
not file.getAbsolutePath().matches("%/ql/test/%") // allows our test cases to work
not file.getAbsolutePath().matches(["%/ql/test/%", "%/ql/automodel/test/%"]) // allows our test cases to work
}
/** Holds if the given compilation unit's package is a JDK internal. */

View File

@@ -12,5 +12,4 @@ dependencies:
codeql/util: ${workspace}
dataExtensions:
- Telemetry/ExtractorInformation.yml
- Telemetry/AutomodelCandidateFilter.yml
warnOnImplicitThis: true

View File

@@ -1 +0,0 @@
Telemetry/AutomodelApplicationModeExtractCandidates.ql

View File

@@ -1 +0,0 @@
Telemetry/AutomodelApplicationModeExtractNegativeExamples.ql

View File

@@ -1 +0,0 @@
Telemetry/AutomodelApplicationModeExtractPositiveExamples.ql

View File

@@ -1 +0,0 @@
Telemetry/AutomodelFrameworkModeExtractCandidates.ql

View File

@@ -1 +0,0 @@
Telemetry/AutomodelFrameworkModeExtractNegativeExamples.ql

View File

@@ -1 +0,0 @@
Telemetry/AutomodelFrameworkModeExtractPositiveExamples.ql