Skip to content

Commit 2ae01f0

Browse files
authored
Add description for API checkMethodCalls in the docs (#589)
1 parent 55548f7 commit 2ae01f0

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

docs/source/quark_script.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ findMethodInAPK(samplePath, targetMethod)
9090
2. targetMethod: A python list contains class name, method name, and descriptor of target method
9191
- **return**: Python list contains caller method instance of target method
9292

93+
checkMethodCalls(samplePath, targetMethod, checkMethods)
94+
=========================================================
95+
96+
- **Description**: Check any of the specific methods shown in the target method.
97+
- **params**:
98+
1. samplePath: target file
99+
2. targetMethod: python list contains the class name, method name, and descriptor of the target method or a Method Object
100+
3. checkMethods: python list contains the class name, method name, and descriptor of the target method
101+
- **return**: bool that indicates if the specific methods are called or defined within a target method or not
102+
93103
Rule(rule.json)
94104
===============
95105

quark/script/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,16 +637,17 @@ def checkMethodCalls(
637637
samplePath: PathLike,
638638
targetMethod: Union[Tuple[str, str, str], MethodObject],
639639
checkMethods: List[Tuple[str, str, str]]) -> bool:
640-
"""Check if any of the specific methods shown in the `targetMethod`
640+
"""Check any of the specific methods shown in the target method.
641641
642642
:param samplePath: target file
643643
:param targetMethod: python list contains the class name,
644644
method name, and descriptor of the target method
645-
or a Method Object.
645+
or a Method Object
646646
:param checkMethods: python list contains the class name,
647647
method name, and descriptor of the target method
648648
649-
:return: bool that indicate specific methods can be called or defined within a `target method` or not.
649+
:return: bool that indicates if the specific methods are called or
650+
defined within a target method or not
650651
"""
651652
targetMethodSet = set()
652653
checkMethodSet = set()

0 commit comments

Comments
 (0)