-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfactory.py
More file actions
25 lines (18 loc) · 700 Bytes
/
factory.py
File metadata and controls
25 lines (18 loc) · 700 Bytes
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
from .ToolClass import ToolClass
from .codechecker import handle as codechecker_handle
from .codeql import handle as codeql_handle
from .cppcheck import handle as cppcheck_handle
from .flawfinder import handle as flawfinder_handle
from .infer import handle as infer_handle
def get_tool_handle(name: str) -> ToolClass:
if name == "codechecker":
return codechecker_handle.handle()
elif name == "codeql":
return codeql_handle.handle()
elif name == "cppcheck":
return cppcheck_handle.handle()
elif name == "flawfinder":
return flawfinder_handle.handle()
elif name == "infer":
return infer_handle.handle()
# TODO define other handles