CodeQL library for Java/Kotlin
codeql/java-all 7.4.0 (changelog, source)
Search

Module AlertFiltering

Provides the restrictAlertsTo extensible predicate to restrict alerts to specific source locations, and the AlertFilteringImpl parameterized module to apply the filtering.

Import path

import codeql.util.AlertFiltering

Predicates

restrictAlertsTo

Holds if the query may restrict its computation to only produce alerts that match the given line ranges. This predicate is used for implementing diff-informed queries for pull requests in GitHub Code Scanning.

restrictAlertsToExactLocation

Holds if the query may restrict its computation to only produce alerts that match the given character ranges. This predicate is suitable for testing, where we want to filter by the exact alert location, distinguishing between alerts on the same line.

Modules

AlertFilteringImpl

Module for applying alert location filtering.