IntelliJ: Error finding secondary location for issue (squid:S1192)

  • Versions used (IntelliJ 2019.2.2)
  • Steps to reproduce: just started IDE…
  • Error observed:
Error finding secondary location for issue
Details: squid:S1192

org.sonarlint.intellij.issue.IssueMatcher$NoMatchException: Start line number (2822) larger than lines in file: 2790
	at org.sonarlint.intellij.issue.IssueMatcher.getIssueTextRange(
	at org.sonarlint.intellij.issue.IssueMatcher.match(
	at org.sonarlint.intellij.issue.IssueProcessor.transformFlows(
	at org.sonarlint.intellij.issue.IssueProcessor.transformIssue(
	at org.sonarlint.intellij.issue.IssueProcessor.transformIssues(
	at org.sonarlint.intellij.issue.IssueProcessor.lambda$process$0(
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(
	at com.intellij.openapi.application.ReadAction.compute(
	at org.sonarlint.intellij.issue.IssueProcessor.process(
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$1(
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$2(
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/

hello @Petr_Nehez,

can you share the file on which this is happening? It should be one of the opens editors in your IDE.

It did happen just once right after opening IDE.
I guess it has to relate to the fact that previous version of file was cached and in a very short moment IDE reread the file while the content was shorter or significantly different (git branch was changed externally).

Hi, thank you for your feedback.

Indeed this could happen if the SCM branch was switched externally to the IDE, and the file contents changed so that the line numbers do not match anymore between analysis and code annotation.

I created SLI-347 to make sure that such exceptions do not bubble up to the global level - external file changes do happen, at a very late time in some cases; and since code annotation happens asynchronously, we don’t have any guarantee that the file contents at annotation time is the same as at analysis time.