Skip to content

Commit 63c8769

Browse files
committed
AlertFiltering: prohibit partial filtering
This documentation-only commit clarifies that a query should either ignore restrictAlertsTo completely or apply restrictAlertsTo filtering to all alerts. This update eliminates the ambiguity on whether a query may choose to apply restrictAlertsTo filtering to only some alerts but not others (it may not).
1 parent 06b1d8e commit 63c8769

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shared/util/codeql/util/AlertFiltering.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ private import codeql.util.Location
1717
* - endLine: End line number (starting with 1, inclusive) to restrict alerts to.
1818
*
1919
* If startLine and endLine are both 0, accept alerts anywhere in the file.
20+
*
21+
* A query should either completely ignore this predicate (i.e., perform no filtering whatsoever),
22+
* or only return alerts that meet the filtering criteria as specified above.
2023
*/
2124
extensible predicate restrictAlertsTo(string filePath, int startLine, int endLine);
2225

0 commit comments

Comments
 (0)