Skip to content

Commit 718c0ab

Browse files
committed
Overlay: Discard base config entities in overlay extracted files
1 parent 5ad332e commit 718c0ab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

java/ql/lib/semmle/code/java/Overlay.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,17 @@ private string baseConfigLocatable(@configLocatable el) {
8888
not isOverlay() and result = getRawFileForConfig(el)
8989
}
9090

91+
overlay[local]
92+
private predicate overlayConfigExtracted(string file) {
93+
isOverlay() and
94+
exists(@configLocatable el | file = getRawFileForConfig(el))
95+
}
96+
9197
overlay[discard_entity]
9298
private predicate discardBaseConfigLocatable(@configLocatable el) {
9399
overlayChangedFiles(baseConfigLocatable(el))
100+
or
101+
// The config extractor is currently not incremental and may extract more
102+
// property files than those included in overlayChangedFiles.
103+
overlayConfigExtracted(baseConfigLocatable(el))
94104
}

0 commit comments

Comments
 (0)