This topic gives a summary of all the resources available for learning how to write effective QL queries, with recommended routes to becoming a good QL programmer.
The easiest way to learn more about QL is to use the query console on LGTM. On LGTM.com, you can write QL code to query open source projects directly—without having to download snapshots and libraries. If your organization uses LGTM Enterprise, you can use this to query private projects too. The query console provides autocomplete suggestions, the option to "jump to definition", and many more writing aids. To start learning QL on LGTM, see Introduction to the QL language and Learning QL.
Alternatively, you can install QL for Eclipse to write and run queries locally. For more information, see QL plugins and extensions. Once you have installed a plugin and obtained a snapshot to run queries against, you can start writing QL in your IDE.
If you are new to QL, start with the following topics:
- QL detective tutorials—A general introduction to QL, with steps to learn how to write your own queries and understand the basic QL syntax.
- Language-specific resources—A list of tutorials to teach you how to query code written in a specific language:
- QL cookbooks—A collection of short example queries that show you how to use QL in practice. You can use these cookbook queries as a starting point for your own experiments:
Writing custom queries
For more examples and information about writing queries to run as part of an analysis, see the following topics:
- Defining the content of query results—A guide to creating user-friendly alert messages.
- Locations and strings for QL entities—Information on how to provide location and string data for query results.
- Query file requirements—An overview of the metadata and content of a query file that is part of an analysis.
For more comprehensive information about QL, see the following reference topics: