mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Copy Python extractor to codeql repo
This commit is contained in:
16
python/extractor/thrift_extractor.py
Executable file
16
python/extractor/thrift_extractor.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
"""Run the thrift extractor locally for debugging.
|
||||
"""
|
||||
import sys
|
||||
import python_tracer
|
||||
|
||||
if __name__ == "__main__":
|
||||
python_tracer.load_library()
|
||||
import semmle.thrift
|
||||
import semmle.files
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage %s INPUT_FOLDER TRAP_FOLDER" % sys.argv[0])
|
||||
sys.exit(1)
|
||||
trap_folder = semmle.files.TrapFolder(sys.argv[2])
|
||||
extractor = semmle.thrift.Extractor(trap_folder)
|
||||
extractor.extract_folder(sys.argv[1])
|
||||
Reference in New Issue
Block a user