Skip to content

Commit 0931ca4

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Docs: switch to previous-id property instead of tag
1 parent cb4e21d commit 0931ca4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/query-metadata-style-guide.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ Note, `@id` properties should be consistent for queries that highlight the same
9393
* `@id java/tainted-format-string`
9494
* `@id cpp/tainted-format-string`
9595

96+
#### Query previous ID `@previous-id`
97+
98+
Queries with alerts that used to be reported on a different query should also have an `@previous-id` property to refer back to the query where the alerts were originally reported. For example, if alerts from `java/query-one` are now reported on `java/query-two`, then the metadata for `java/query-two` should contain: `@previous-id java/query-one`.
99+
96100

97101
### Query type `@kind`
98102

@@ -139,8 +143,6 @@ There are also more specific `@tags` that can be added. See, the following pages
139143

140144
Metric queries (`@kind metric`) may have the `summary` tag. If SARIF output is used, the results of these queries can be found at `run[].properties.metricResults`.
141145

142-
Queries with alerts that used to be reported on a different query should have a `previous-id:<previous-query-id>` tag to refer back to the query where the alerts were originally reported. For example, if alerts from `java/query-one` are now reported on `java/query-two`, then the metadata for `java/query-two` should contain: `@tags previous-id:java/query-one`.
143-
144146
If necessary, you can also define your own low-level tags to categorize the queries specific to your project or organization. When creating your own tags, you should:
145147

146148
* Use all lower-case letters, including for acronyms and proper nouns, with no spaces. All characters apart from * and @ are accepted.

0 commit comments

Comments
 (0)