LGTM Enterprise 1.25


You can search LGTM for projects, people, queries, or for information in the embedded help system:

  • By using the search box on the home page, or
  • From the search field at the top of pages throughout LGTM

As you type in the search field, the five closest matching projects are shown in a drop-down list—click any of these to go to the project page. If none of the suggestions in the drop-down list is what you're looking for, click the search icon or press Enter to see more search results.

The keyword search returns the projects, people, queries or the LGTM help topics that match all the terms you searched for. You can filter your results to show just the matching projects, people, queries or LGTM help topics by clicking Projects, People, Queries or Help in the sidebar at the left of the results page.

Finding projects

By default, LGTM Enterprise uses the repository name for each project. So a project hosted on GitHub Enterprise at: https://git.example.com/team-alpha/project-one would have the project name team-alpha/project-one in LGTM. Some LGTM administrators may use a different convention. Searching returns matches on full words within project names, where a word is considered to be anything delimited by a special character or camelCase. So searches for any, or all, of team, alpha one would include this example project in the results.

Click a project result to see the project page.

If your search term exactly matches a single LGTM project name, you're automatically redirected to the project page.

You can limit project searches to a single language using the language: keyword and the corresponding language code.

For example: a search for language:java reports all Java projects that are available on your installation of LGTM Enterprise. Up to 1000 results are reported for any search.

For TypeScript, use JavaScript (the TypeScript analysis is integrated with the JavaScript analysis).

You also can limit project searches to a single repository host using the host: keyword and the corresponding repository provider short name.

If you don't know the available repository provider short names, contact your LGTM administrator (within your organization).

For a list of supported repository hosts, see About LGTM.

Finding people

LGTM stores the name of everyone who has contributed to any of the repositories that have been analyzed. Searching returns matches on full words within each user's full name (as defined on their Account settings page).

Click a people result to see the profile page for that user.

When someone creates an LGTM account by logging in with an external account, the default full name is the full name you defined in your profile. In general we'll try to get your display name from the external account, so we'll display a nice name instead of your username which is probably all lowercase with no spaces.

Finding queries

When you search LGTM, your search terms are matched against the name, description and tags of the available queries.

For permission reasons, the LGTM search functionality doesn't work for per-project custom queries. To find this type of query, use the Queries tab for the project. For further details, see Viewing a list of queries available for a project.

To search for queries for a specific programming language, use the language: keyword and the language code that defines the language you want. For example, add language:java to your search terms, to limit your search results to Java.

To search for queries using tags, type tag: followed by the tag name in the search box. So, for example, to return all the maintainability queries, use tag:maintainability.

If you want to find queries that are related to the common software weakness CWE-313, you need to use the whole explicit tag, that is external/cwe/cwe-313, not just cwe-313.

To search for all the queries in a query pack, either:

  • Search for that query pack in LGTM using the following syntax: pack:<pack-name>. An example is pack:com.lgtm/csharp-queries.
  • Click the query pack name (in green) on the query's help. This takes you to a page showing a list of all queries in that pack:
    • For built-in queries, this will be the search results page.
    • For per-project custom queries, this will be the Queries tab, opened on that query pack.
  • For more information on query packs, refer to About queries, and for an example of query help, see What does the query help look like in LGTM?.

After you run a search, click Queries, in the sidebar at the left of the results page, to show only links to the query help pages for the matching queries (that is, any results for projects, people and the help are filtered out).

Click a link in the results list to show the help page that relates to the matched query. You can display the query itself by clicking Open in query console at the top right of the query help page.

As with project searches, you can limit query searches to a single language using the language: keyword and the language code.

Finding information in the help

You can search LGTM's embedded help using the built-in search functionality.

As with the other searches, results for the embedded help system are ranked by relevance (most relevant at the top). After you run a search, click Help, in the sidebar at the left of the results page, to show only links to the LGTM help. Click the desired result to open the corresponding help topic in LGTM.

When you finish browsing the embedded help, click an option on the navigation bar at the top to return to the main LGTM interface. Alternatively, click the tarsius logo (—top left of the embedded help) to open the LGTM front page.