Skip to content

skipFunctions

zero-plusplus edited this page Oct 3, 2021 · 1 revision

Note that the skipping process is technically slow, so if large loops are involved, there will be more than a few seconds of waiting time.

This attribute is useful when you want to skip a specific function (including method).

For example, in Functor, which treats a class like a function, the __Call meta-function is defined to call the call method.

Since this meta-function just calls the call method, no one should be interested in this function after the first test. If you want to skip this uninteresting method, you can set it as follows.

"skipFunctions": [
  "Functor.__Call"
]

For matching, wildcards can be used. The following is an example of skipping all methods of the Example class.

"skipFunctions": [
  "Example.*"
]

* represents an arbitrary string, and in the above example, Example.methodA, Example.innerClass.methodB, etc. will be skipped.

With this setting, all methods in the class will be skipped. If you do not want to skip specific methods, prefix them with ! at the beginning.

"skipFunctions": [
  "Example.*",
  "!Example.method",
]

Finally, here is an example of skipping meta-functions for all classes.

"skipFunctions": [
  "*.__Init",
  "*.__Call",
  "*.__Get",
  "*.__Set",
]