Before you can write and run queries to analyze a project, you need a snapshot of that project. Each snapshot contains a database for a single language. If a project uses multiple languages, then you can have a snapshot for each language.
Here are a few ways to obtain a snapshot to use in QL for Eclipse:
You can download snapshots to analyze in
You may find that some snapshots available to download from LGTM.com have been built by a more recent analysis process than the one available in
However, even if a new snapshot is not compatible with
Every time you analyze a project using Semmle Core, a snapshot is created. You can convert this Semmle Core snapshot into a QL for Eclipse snapshot using the export command:
- Open a command prompt on a server where Semmle Core is running.
- Check that the environment is set up correctly.
odasa export --project projects/<project> --latestwhere
projects/<project>is the relative or absolute path for the project that you want to export.
This creates a snapshot in the directory where you ran the
--latest flag means that you export the most
recently analyzed snapshot for the project that you specified. If you want to export an older snapshot, see the other available flags in the export command reference.
If you create a project using the bootstrap command, you can also choose to export a snapshot automatically at the end of the process.
Once you have a snapshot, see Importing a snapshot to find out how to use it in QL for Eclipse.
To find out more about snapshots, and how they are created, see What is a snapshot?