Skip to content

Commit a6c03a4

Browse files
authored
Merge pull request github#3449 from jf205/sd-38
CodeQL docs: remove information about metric queries
2 parents 46140c3 + 85ebe04 commit a6c03a4

File tree

3 files changed

+30
-85
lines changed

3 files changed

+30
-85
lines changed

docs/language/learn-ql/writing-queries/introduction-to-queries.rst

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,9 @@ CodeQL includes queries to find the most relevant and interesting problems for e
1010

1111
- **Alert queries**: queries that highlight issues in specific locations in your code.
1212
- **Path queries**: queries that describe the flow of information between a source and a sink in your code.
13-
- **Metric queries**: queries that compute statistics for your code.
1413

1514
You can add custom queries to `custom query packs <https://lgtm.com/help/lgtm/about-queries#what-are-query-packs>`__ to analyze your projects in `LGTM <https://lgtm.com>`__, use them to analyze a database with the `CodeQL CLI <https://help.semmle.com/codeql/codeql-cli.html>`__, or you can contribute to the standard CodeQL queries in our `open source repository on GitHub <https://github.com/github/codeql>`__.
1615

17-
.. pull-quote::
18-
19-
Note
20-
21-
Only the results generated by alert and path queries are displayed on LGTM.
22-
You can display the results generated by metric queries by running them against your project in the `query console on LGTM <https://lgtm.com/query>`__ or with the CodeQL `extension for VS Code <https://help.semmle.com/codeql/codeql-for-vscode.html>`__.
23-
You can explore the paths generated by path queries `directly in LGTM <https://lgtm.com/help/lgtm/exploring-data-flow-paths>`__ and in the `Results view <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-paths.html>`__ in VS Code.
24-
25-
2616
This topic is a basic introduction to query files. You can find more information on writing queries for specific programming languages `here <https://help.semmle.com/QL/learn-ql/>`__, and detailed technical information about QL in the `QL language reference <https://help.semmle.com/QL/ql-handbook/index.html>`__.
2717
For more information on how to format your code when contributing queries to the GitHub repository, see the `CodeQL style guide <https://github.com/github/codeql/blob/master/docs/ql-style-guide.md>`__.
2818

@@ -45,7 +35,7 @@ Basic query structure
4535
where /* ... logical formula ... */
4636
select /* ... expressions ... */
4737

48-
The following sections describe the information that is typically included in a query file for alerts and metrics. Path queries are discussed in more detail in :doc:`Creating path queries <path-queries>`.
38+
The following sections describe the information that is typically included in a query file for alerts. Path queries are discussed in more detail in :doc:`Creating path queries <path-queries>`.
4939

5040
Query metadata
5141
==============
@@ -65,7 +55,6 @@ Query metadata is used to identify your custom queries when they are added to th
6555

6656
- Alert query metadata must contain ``@kind problem``.
6757
- Path query metadata must contain ``@kind path-problem``.
68-
- Metric query metadata must contain ``@kind metric``.
6958

7059
When you define the ``@kind`` property of a custom query you must also ensure that the rest of your query has the correct structure in order to be valid, as described below.
7160

@@ -121,13 +110,6 @@ You can modify the alert message defined in the final column of the ``select`` s
121110

122111
Select clauses for path queries (``@kind path-problem``) are crafted to display both an alert and the source and sink of an associated path graph. For more information, see :doc:`Creating path queries <path-queries>`.
123112

124-
Select clauses for metric queries (``@kind metric``) consist of two 'columns', with the following structure::
125-
126-
select element, metric
127-
128-
- ``element``: a code element that is identified by the query, which defines where the alert is displayed.
129-
- ``metric``: the result of the metric that the query computes.
130-
131113
Viewing the standard CodeQL queries
132114
***********************************
133115

0 commit comments

Comments
 (0)