From 407c265dafc131c637ed3a239c0e28cd591ddc5d Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Thu, 16 Dec 2021 12:12:36 +0000 Subject: [PATCH 1/2] Add `kind` metadata to example query. --- javascript/ql/examples/snippets/todocomment.ql | 1 + 1 file changed, 1 insertion(+) diff --git a/javascript/ql/examples/snippets/todocomment.ql b/javascript/ql/examples/snippets/todocomment.ql index 1412ad51a76..8caea84fe52 100644 --- a/javascript/ql/examples/snippets/todocomment.ql +++ b/javascript/ql/examples/snippets/todocomment.ql @@ -2,6 +2,7 @@ * @id js/examples/todocomment * @name TODO comments * @description Finds comments containing the word TODO + * @kind problem * @tags comment * TODO */ From 4a1e2ed408d7dad7245c34b0544763d1601213fb Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Thu, 16 Dec 2021 14:02:36 +0000 Subject: [PATCH 2/2] Add a severity and select the correct number of columns. --- javascript/ql/examples/snippets/todocomment.ql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javascript/ql/examples/snippets/todocomment.ql b/javascript/ql/examples/snippets/todocomment.ql index 8caea84fe52..c373934f0db 100644 --- a/javascript/ql/examples/snippets/todocomment.ql +++ b/javascript/ql/examples/snippets/todocomment.ql @@ -3,6 +3,7 @@ * @name TODO comments * @description Finds comments containing the word TODO * @kind problem + * @problem.severity recommendation * @tags comment * TODO */ @@ -11,4 +12,4 @@ import javascript from Comment c where c.getText().regexpMatch("(?si).*\\bTODO\\b.*") -select c +select c, "TODO comments indicate that the code may not be complete."