This section describes how to install Ocular. Once you have installed it, proceed with Getting started.
Ocular runs on top of the Java virtual machine. Please make sure you have a Java Runtime Environment >= 1.8 installed.
Begin by decompressing the provided ZIP file
shiftleft-cmd-distribution.zip. This will create the directory
unzip shiftleft-cmd-distribution.zipcd shiftleft-cmd-distribution
Run the installer and follow the prompts:
The install script will:
ask you where you want to install it to (defaults to
check if there is an existing installation and offer to delete it
unpack the ShiftLeft dynamic policy to
~/.shiftleft/policy/dynamic and offer to delete it, if it already exists
unpack the ShiftLeft static policy to
~/.shiftleft/policy/static and offer to delete it, if it already exists.
not touch anything outside these directories (installation and policy)
Code analysis can require lots of memory, and unfortunately, the Java virtual machine does not pick up the available amount of memory by itself. While tuning Java memory usage is a discipline in its own right, it is usually sufficient to specify the maximum available amount of heap memory via the Java virtual machine's
-Xmx flag. The easiest way to achieve this globally is by setting the environment variable
_JAVA_OPTS as follows:
$N is the amount of memory in gigabytes. You can add this line to your shell startup script, e.g.,