Skip to content

Commit db99abc

Browse files
committed
Java: add alert filtering helper
1 parent 1c48bd5 commit db99abc

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

java/ql/lib/java.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Customizations
44
import semmle.code.FileSystem
55
import semmle.code.Location
66
import semmle.code.Unit
7+
import semmle.code.java.AlertFiltering
78
import semmle.code.java.Annotation
89
import semmle.code.java.Compilation
910
import semmle.code.java.CompilationUnit
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Provides a Java-specific instantiation of the `AlertFiltering` module.
3+
*/
4+
5+
private import codeql.util.AlertFiltering
6+
private import semmle.code.Location
7+
8+
/** Module for applying alert location filtering. */
9+
module AlertFiltering {
10+
import AlertFilteringImpl<Location>
11+
12+
/** Applies alert filtering to the given `Top` locatable. */
13+
predicate filterByLocatable(Top locatable) { filterByLocation(locatable.getLocation()) }
14+
}

0 commit comments

Comments
 (0)