Uploaded image for project: 'SonarLint Core Library'
  1. SonarLint Core Library
  2. SLCORE-279

Detect file language even if the corresponding analyzer is not loaded

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.14
    • Component/s: Core
    • Labels:
      None

      Description

      Currently language detection rely on the extension point org.sonar.api.resources.Language implemented by plugins. The downside of this approach is that there is a lifecycle issue. We may want to do some actions conditionally to the file language, even if the analyzer is not there.
      For example, if the analyzer could not be loaded for some technical reason (like MMF-2133) then we would like to warn the user only when a file of the affected language is about to be analyzed.

      Later, we could even think about lazyly downloading/loading analyzer only when a first file or the language is opened.

      For all those reasons, SonarLint should take back the ownership of language detection.

      Also, SonarLint supports a fixed list of languages, so the "pluggability" is not important for us.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.henry Julien Henry
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: