mirror of
https://github.com/github/codeql.git
synced 2026-03-02 05:43:54 +01:00
Overlay: Add discarding of base XML locatables for Java
This commit is contained in:
@@ -99,3 +99,23 @@ private predicate discardBaseConfigLocatable(@configLocatable el) {
|
||||
// should be discarded.
|
||||
baseConfigLocatable(el) and overlayHasConfigLocatables()
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private predicate baseXmlLocatable(@xmllocatable l) {
|
||||
not isOverlay() and not files(l, _) and not xmlNs(l, _, _, _)
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private predicate overlayHasXmlLocatable() {
|
||||
isOverlay() and
|
||||
exists(@xmllocatable l | not files(l, _) and not xmlNs(l, _, _, _))
|
||||
}
|
||||
|
||||
overlay[discard_entity]
|
||||
private predicate discardBaseXmlLocatable(@xmllocatable el) {
|
||||
// The XML extractor is currently not incremental, so if
|
||||
// the overlay contains any XML locatables, the overlay should
|
||||
// contain a full extraction and all XML locatables from base
|
||||
// should be discarded.
|
||||
baseXmlLocatable(el) and overlayHasXmlLocatable()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user