Note: This documentation is for the legacy command-line tool odasa.
The final version was released in May 2020. Support for this tool expires in May 2021.

For documentation on the new generation CodeQL CLI, see CodeQL CLI .
In particular, you may find the Notes for legacy QL CLI users useful in planning your migration.

Skip to end of metadata
Go to start of metadata

Purpose

The export tool is used to export a snapshot of a project from the Semmle installation. This snapshot can then be imported into QL for Eclipse and used to test new queries, or uploaded to LGTM for continuous security analysis.

Usage

This tool is run from the command line as follows:

odasa export [--verbose] [--verbosity <level>] [--project <project>]
 [--concurrent] [--earliest] [--latest]  [--output <filename>] [--keep-cached] [--force] <snapshot>

Flags

The export tool supports the following flags:

FlagsValueExampleNotes
--verbose--

Optional. Output more detailed information about actions. This increases the verbosity to level 4.

Default: level verbosity

--verbosity<level>2

Optional. Define the precise level of reporting required where 0 suppresses all output and 6 reports all levels of detail available. You can use the --verbose flag as shorthand for --verbosity 4 .

Default: 3

--project<project>projects/myproject

Optional, defines the location of the project configuration file to use with the --earliest or --latest flag.

Default: current directory

--earliest-

Optional, use to export the oldest snapshot for the project configuration defined using the --project flag. Alternatively, define a snapshot to export.

--latest--Optional, use to export the most recent snapshot for the project configuration defined using the --project flag. Alternatively, define a snapshot to export.
--concurrent--

Optional, use to allow the concurrent execution of other commands. Use with care.

Default: the snapshot files are locked to other tools until this tool has completed.

--outputfilenamemy-directory/snapshot

Optional, use to define a location and name for the zip file to create.

Default: <project>-<snapshot>.zip created in the directory where the command was executed.

--keep-cached--

Optional, use to preserve currently-computed cached predicates in the exported archive.

Note, to use this flag, your QL for Eclipse version number must exactly match your Semmle Core version number. If the version numbers do not match, QL for Eclipse will delete the cache and rebuild it from scratch. You can find your Semmle Core version number by running the selfTest command.

--keep-results--

Optional, use to include any existing query results.

--force--

Optional, use to export a new snapshot even if the file already exists

Default: if the file already exists then report an error.

<snapshot>-revision-2015-December-1--22-12-12Optional, define the snapshot to export.

Results

When this tool runs it creates a zip archive of the source code for the project. Unless you use the --output flag to define an alternative location/filename, the archive is created in the current directory with the name <project>-<snapshot>.zip. This file is ready for import into QL for Eclipse (Installing QL for Eclipse) and upload to LGTM.

Exit code

This tool returns a 0 exit code on success. If an error occurs, such as the specified snapshot does not exist, then the exit code is non-zero.