mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
remove TestFileCharacteristic as it's redundant
This commit is contained in:
@@ -221,23 +221,6 @@ private class ExceptionCharacteristic extends CharacteristicsImpl::NotASinkChara
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A negative characteristic that indicates that an endpoint sits in a test file.
|
||||
*/
|
||||
private class TestFileCharacteristic extends CharacteristicsImpl::LikelyNotASinkCharacteristic {
|
||||
TestFileCharacteristic() { this = "test file" }
|
||||
|
||||
override predicate appliesToEndpoint(Endpoint e) {
|
||||
exists(File f | f = e.getLocation().getFile() and isInTestFile(f))
|
||||
}
|
||||
|
||||
private predicate isInTestFile(File file) {
|
||||
file.getAbsolutePath().matches("%src/test/%") or
|
||||
file.getAbsolutePath().matches("%/guava-tests/%") or
|
||||
file.getAbsolutePath().matches("%/guava-testlib/%")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A characteristic that limits candidates to parameters of methods that are recognized as `ModelApi`, iow., APIs that
|
||||
* are considered worth modeling.
|
||||
|
||||
Reference in New Issue
Block a user