Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-501

SonarLint triggering the analysis of a stream of characters and not just of a source file



    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:



      For the time being, SonarLint can "only" trigger the analysis of a source file and this leads to an important constraint : when developing in your favorite IDE, an edited source file needs first to be saved on the disk to be analyzed by SonarLint. If we take the example of IntelliJ IDEA, this is not the default behavior to regularly save changes on disk and so SonarLint forces this behavior (see SLI-109).

      This evolution would solve some synchronization issues that we've already started to encounter, see SLI-33 (when the analysis of a source file is triggered but meanwhile the source file is deleted by the developer)

      If we dream a little bit further, we could even imagine tomorrow, SonarLint interacting with analyzers through a protocol like the "Language Server Protocol" (https://github.com/Microsoft/language-server-protocol) to only ask for the analysis of a chunk of code instead of analyzing again the overall source code. This would require analyser to manage an analysis context (see MMF-556) but this is already something we planned to do. But this is not in the scope of this MMF.

      Use case

      As an IntelliJ developer, I expect to get immediate feedback on my code, without having to wait 2 seconds that SLI forces a save on the file to be able to analyze it.

      Technical specification

      Here's how this would be achieved:

      1. Develop this "streaming" API on SonarQube side
      2. Embed this evolution in SonarLint Core
      3. Update one language plugin (JavaScript would probably be a good candidate) to support this evolution
        • Note: the plugin must remain backward compatible with SQ 5.6
      4. Modify SLI to use this new API
        • Note: SLI must be able to work with existing language plugins that haven't been updated to this new API

      Open question related to the Java support

      What about rules that require bytecode to be available and up-to-date?

      • => the problem is already there with existing version of SLI
      • Out of scope


          Issue Links



              christophe.levis Christophe Levis
              freddy.mallet Freddy Mallet (Inactive)
              0 Vote for this issue
              2 Start watching this issue