SONARJAVA-7095 Save and restore the Spring context gathering model between analyses - #6289
aurelien-coet-sonarsource wants to merge 1 commit into
Conversation
02259e8 to
c74f349
Compare
15913cd to
3a5cee8
Compare
This comment has been minimized.
This comment has been minimized.
3a5cee8 to
5945fce
Compare
5945fce to
ff0e310
Compare
Code Review ✅ Approved 4 closed / 4 findings🟡 Medium risk · Adds configurable Spring-model persistence and changes incremental analysis reconstruction. Saves and restores the Spring context gathering model between analyses, addressing stale beans from untracked file deletions, incomplete test coverage for root-project resolution, premature file renaming before flush completion, and error handling during model serialization. ✅ 4 closed✅ Bug: Restored model never drops deleted/renamed files, keeping stale beans
✅ Quality: Root-project path test never exercises root-project resolution
✅ Bug: Temp file is renamed over the model before the writer is flushed
✅ Bug: Saving the model always runs, and any write error fails the analysis
Review coverage🧪 Functional validation 2 of 2 objectives covered 📋 Rules No rules evaluated Cross-repo coverage 5 repositories selected 🤖 Auto-approval Not enabled · Set up Implementation Status ✅ 2 of 2 objectives covered✅ SONARJAVA-7095 - 2 of 2 objectives coveredThis PR implements on-disk serialization and de-serialization for the Spring context model at the start and end of analyses. ✅ 2 covered here
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|




Summary by Gitar
SpringContextModelPersistenceto save and loadSpringContextGatheringModelacross analysessonar.java.springContext.model.pathproperty to configure spring context model persistence file pathrestoreFrom,removeUnvisitedFiles, and lifecycle support inSpringContextGatheringModelto preserve unchanged files between analysesThis will update automatically on new commits.