mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
C#: Add script for running CaptureModel queries and generate qll source file.
This commit is contained in:
15
csharp/ql/src/utils/model-generator/GenerateFlowModel.py
Executable file
15
csharp/ql/src/utils/model-generator/GenerateFlowModel.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import subprocess
|
||||
|
||||
# Add Model as Data script directory to sys.path.
|
||||
gitroot = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
|
||||
madpath = os.path.join(gitroot, "misc/scripts/models-as-data/") # Note that this has been changed.
|
||||
sys.path.append(madpath)
|
||||
|
||||
import generate_flow_model as model
|
||||
|
||||
language = "csharp"
|
||||
model.Generator.make(language).run()
|
||||
Reference in New Issue
Block a user