-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathX0_parser_php.py
More file actions
29 lines (23 loc) · 1.15 KB
/
X0_parser_php.py
File metadata and controls
29 lines (23 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from libs_com.args_utils import check_required_path
from tree_php.PhpTreeParser import PhpParser
from tree_php.php_parser_args import parse_php_parser_args
from tree_php.php_result_utils import split_store_parsed_infos
if __name__ == '__main__':
args = parse_php_parser_args()
project_path = args.project_path
check_required_path(project_path, "Scan Path")
project_name = args.project_name
workers = args.workers
save_cache = args.save_cache
import_filter = args.import_filter
exclude_keys = args.exclude_keys
# project_name = "default_project"
# project_path = r"C:\phps\WWW\TestCode\EcShopBenTengAppSample"
php_parser = PhpParser(project_name=project_name, project_path=project_path)
parsed_infos = php_parser.analyse(save_cache=save_cache,
workers=workers,
import_filter=import_filter,
exclude_keys=exclude_keys
)
result_infos = split_store_parsed_infos(parsed_infos, project_name, project_path)
print(f"The analysis results have been saved to:{result_infos}")