mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Java: Update the Java model re-generate script.
This commit is contained in:
@@ -5,19 +5,17 @@
|
||||
from pathlib import Path
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import sys
|
||||
|
||||
|
||||
defaultModelPath = "java/ql/lib/semmle/code/java/frameworks"
|
||||
lgtmSlugToModelFile = {
|
||||
# "apache/commons-beanutils": "apache/BeanUtilsGenerated.qll",
|
||||
# "apache/commons-codec": "apache/CodecGenerated.qll",
|
||||
# "apache/commons-lang": "apache/Lang3Generated.qll",
|
||||
"apache/commons-io": "apache/IOGenerated.qll",
|
||||
"apache/commons-io": "org.apache.commons.io",
|
||||
}
|
||||
|
||||
|
||||
@@ -36,13 +34,12 @@ def regenerateModel(lgtmSlug, extractedDb):
|
||||
print("ERROR: slug " + lgtmSlug +
|
||||
" is not mapped to a model file in script " + sys.argv[0])
|
||||
sys.exit(1)
|
||||
modelFile = defaultModelPath + "/" + lgtmSlugToModelFile[lgtmSlug]
|
||||
modelFile = lgtmSlugToModelFile[lgtmSlug]
|
||||
codeQlRoot = findGitRoot()
|
||||
targetModel = codeQlRoot + "/" + modelFile
|
||||
subprocess.check_call([codeQlRoot + "/java/ql/src/utils/model-generator/GenerateFlowModel.py",
|
||||
"--with-summaries", "--with-sinks",
|
||||
extractedDb, targetModel])
|
||||
print("Regenerated " + targetModel)
|
||||
"--with-summaries", "--with-sinks", "--with-negative-summaries",
|
||||
extractedDb, modelFile])
|
||||
print("Regenerated " + modelFile)
|
||||
shutil.rmtree(tmpDir)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user