Skip to content

Commit 5d849a9

Browse files
committed
Add docs for summary type queries
1 parent 768e519 commit 5d849a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/query-metadata-style-guide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ If your query is a security query, use one or more `@tags` to associate it with
157157

158158
When you tag a query like this, the associated CWE pages from [MITRE.org](http://cwe.mitre.org/index.html) will automatically appear in the reference section of its associated qhelp file.
159159

160+
#### Metric/summary `@tags`
161+
162+
Queries with the `summary` tag represent metrics or other pieces of summary information. If SARIF output is used, the results of these queries can be found at `run[].properties.metricResults`.
163+
164+
Code Scanning may use tags to identify queries with specific meanings across languages. Currently, there is only one such tag: `lines-of-code`. The sum of the results for queries with this tag that return a single integer column ([example for JavaScript](https://github.com/github/codeql/blob/c47d680d65f09a851e41d4edad58ffa7486b5431/java/ql/src/Metrics/Summaries/LinesOfCode.ql)) is assumed by Code Scanning to be the lines of code under the source root present in the database. Each language should have exactly one query of this form.
165+
160166
## QL area
161167

162168
### Alert messages

0 commit comments

Comments
 (0)