Skip to content

Commit 59542fc

Browse files
author
james
committed
mention of qldoc comment requirements
1 parent 934fd9f commit 59542fc

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/query-metadata-style-guide.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,23 @@ For examples of query files for the languages supported by Semmle, see the follo
2727

2828
## Metadata area
2929

30-
Query file metadata contains important information which defines the name and purpose of the query. In order to help others use your query, and to ensure that the query works correctly on LGTM.com, you should include all of the required information outlined below in the metadata, and as much of the optional information as possible. For further information on query metadata see [Query file requirements](https://help.semmle.com/wiki/display/SD/Query+file+requirements).
30+
Query file metadata contains important information which defines the name and purpose of the query. The metadata is included as the content of a valid QLDoc comment, on lines with leading whitespace followed by `*`, between an initial `/**` and a trailing `*/`. For example:
31+
32+
```
33+
/**
34+
* @name Useless assignment to local variable
35+
* @description An assignment to a local variable that is not used later on, or whose value is always
36+
* overwritten, has no effect.
37+
* @kind problem
38+
* @problem.severity warning
39+
* @id cs/useless-assignment-to-local
40+
* @tags maintainability
41+
* external/cwe/cwe-563
42+
* @precision very-high
43+
*/
44+
```
45+
46+
In order to help others use your query, and to ensure that the query works correctly on LGTM.com, you should include all of the required information outlined below in the metadata, and as much of the optional information as possible. For further information on query metadata see [Query file requirements](https://help.semmle.com/wiki/display/SD/Query+file+requirements).
3147

3248
### Query name `@name`
3349

0 commit comments

Comments
 (0)