Help Directive
The Help Directive is a CPGQL Directive which returns textual descriptions of other directives.
If it is executed by itself, it shows an overview of Top-Level Commands:
ocular> help
res0: Helper = Welcome to the interactive help system. Below you find a table of all available
top-level commands. To get more detailed help on a specific command, just type
`help.<command>`.
Try `help.importCode` to begin with.
_______________________________________________________________________________
command | description | example |
==============================================================================|
close | Close project by name | close(projectName) |
cpg | CPG of the active project | cpg.method.l |
delete | Close and remove project from disk | delete(projectName) |
importCode | Create new project from code | importCode("example.jar")|
importCpg | Create new project from existing CPG| importCpg("cpg.bin.zip") |
open | Open project | open("projectName") |
project | Currently active project | project |
reloadPolicy| reload policy | reloadPolicy |
run | Run analyzer on active CPG | run.securityprofile |
save | Write all changes to disk | save |
undo | undo effects of analyzer | undo |
workspace | Access to the workspace directory | workspace |
If executed with a Top-Level Command CPGQL Component prefix, it describe that Top-Level Command:
ocular> help.save
res0: String = """
Close and reopen all loaded CPGs. This ensures that changes have been flushed to
disk.
Returns list of affected projects"""