-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARJAVA-4988: Use SonarLintCache component and make it accessible t…
…o custom rules via the caching APIs (#4792) To enable DBD support in SonarLint for Java in VSCode, DBD needs to be able to access the intermediate representation (IR) files it generates for the Java code under analysis. This IR is generated by custom rules for sonar-java which are provided by DBD, and usually it is stored in the file system. However, no file system is available in a SonarLint context. Hence, the IR needs to be transferred in memory. For DBD Python analysis, this has been achieved by utilizing a cache context. I.e. a component SonarLintCache is injected into the Python analyzer frontend, a CacheContext is constructed from it, and DBD’s custom rules store the IR in this cache. Then, when the DBD plugin is executed, it can retrieve the IR from the cache. This PR applies the same change to sonar-java. --- * SONARJAVA-4988: Expose SonarProduct on ModuleScannerContext DBD custom rules need this information to turn off saving IR to the filesystem in a SonarLint context * SONARJAVA-4988: Always provide CacheContext if SonarLintCache is available * SONARJAVA-4988: CacheContexts based on SonarLintCache should not report as a proper cache * SONARJAVA-4988: Permit sensor execution ordering using @DependedUpon annotations
- Loading branch information
1 parent
aad7d6f
commit 0a5e7a4
Showing
18 changed files
with
707 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.