Packages

package scripting

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait AmmoniteExecutor extends AnyRef

    Provides an interface for the execution of scripts using the Ammonite interpreter.

    Provides an interface for the execution of scripts using the Ammonite interpreter.

    All scripts are compiled in-memory and no caching is performed.

  2. abstract class ScriptManager extends AnyRef

    This class manages a hierarchy of scripts, and provides an interface that allows users to easily discover and run scripts on their CPGs.

    This class manages a hierarchy of scripts, and provides an interface that allows users to easily discover and run scripts on their CPGs.

    Scripts should be grouped inside folders placed within the application's resources/scripts directory, for example:

    resources |-- scripts |-- java |-- my-java-script.sc |-- go |-- csharp

    To run my-java-script.sc you would run: runScript("java/my-java-script.sc", cpg)

Value Members

  1. object ScalaReflectWorkaround

    a workaround for a scala reflect bug, where the first invocation of scala reflect fails idea: invoke this at the very start to trigger the bug.

    a workaround for a scala reflect bug, where the first invocation of scala reflect fails idea: invoke this at the very start to trigger the bug. future invocations should be fine i asked to move the retry logic into scala reflect as a better way to handle this https://github.com/scala/bug/issues/12038#issuecomment-760629585

    to reproduce the issue, comment out this workaround, publish cpg locally and run the following in the codescience repo: cpg2sp/testOnly *PolicyAmmoniteExecutorTest if the above is green without this workaround, we don't need it any more

  2. object ScriptManager

Ungrouped