mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Exclude main methods from models
This commit is contained in:
@@ -29,7 +29,8 @@ private string isExtensible(RefType ref) {
|
||||
|
||||
predicate isRelevantForModels(Callable api) {
|
||||
not isInTestFile(api.getCompilationUnit().getFile()) and
|
||||
not isJdkInternal(api.getCompilationUnit())
|
||||
not isJdkInternal(api.getCompilationUnit()) and
|
||||
not api instanceof MainMethod
|
||||
}
|
||||
|
||||
private predicate isInTestFile(File file) {
|
||||
|
||||
@@ -21,4 +21,8 @@ public class Sinks {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user