tolsam
tolsam

Reputation: 25

sonarlint doesn't work when Intellij IDEA is not install on C: drive in windows

I have 2 installations of IntelliJ IDEA, one on C: drive and one on another drive (F:). I have installed on both the SonarLint plugin and it works only on the C: drive installation.

The is 'other' has different roor and I think has to do with the following.

The error stacktrace is

java.lang.IllegalArgumentException: 'other' has different root
    at sun.nio.fs.WindowsPath.relativize(WindowsPath.java:392)
    at sun.nio.fs.WindowsPath.relativize(WindowsPath.java:44)
    at org.sonarlint.intellij.util.SonarLintUtils.getRelativePath(SonarLintUtils.java:383)
    at org.sonarlint.intellij.issue.IssueManager.wasAnalyzed(IssueManager.java:108)
    at org.sonarlint.intellij.issue.IssueManager.store(IssueManager.java:120)
    at org.sonarlint.intellij.issue.IssueManager.store(IssueManager.java:114)
    at org.sonarlint.intellij.issue.IssueProcessor.process(IssueProcessor.java:72)
    at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:114)
    at org.sonarlint.intellij.analysis.SonarLintUserTask.run(SonarLintUserTask.java:39)
    at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$null$18(SonarLintJobManager.java:115)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
    at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$19(SonarLintJobManager.java:115)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Upvotes: 2

Views: 892

Answers (1)

Duarte Meneses
Duarte Meneses

Reputation: 2938

I confirm that SonarLint for IntelliJ is unable to analyze files that are under a filesystem root other than the one where SonarLint stores its files (in IntelliJ's config directory).

The problem should be fixed soon: https://jira.sonarsource.com/browse/SLI-204.

Upvotes: 2

Related Questions