Error in SonarLint for IntelliJ on Windows 10


  • Java: JetBrains s.r.o. 11.0.13
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2021.3.1
  • SonarLint:

Error determining tab size

java.lang.IllegalStateException: @NotNull method com/intellij/psi/impl/source/codeStyle/CodeStyleSchemeImpl.getCodeStyleSettings must not return null
	at c.ij.psi.impl.source.codeStyle.CodeStyleSchemeImpl.$$$reportNull$$$0(
	at c.ij.psi.impl.source.codeStyle.CodeStyleSchemeImpl.getCodeStyleSettings(
	at c.ij.psi.codeStyle.CodeStyleSettingsManager.getCurrentSettings(
	at c.ij.application.options.CodeStyle.getSettings(
	at c.ij.oa.editor.impl.SettingsImpl.getTabSize(
	at c.ij.oa.editor.ex.util.EditorUtil.getTabSize(
	at c.ij.oa.editor.impl.view.EditorView.getTabSize(
	at c.ij.oa.editor.impl.view.LogicalPositionCache.reset(
	at c.ij.oa.editor.impl.view.EditorView.reinitSettings(
	at c.ij.oa.editor.impl.EditorImpl.<init>(
	at c.ij.oa.editor.impl.EditorFactoryImpl.createEditor(
	at c.ij.oa.editor.impl.EditorFactoryImpl.createViewer(
	at c.ij.execution.impl.ConsoleViewUtil.setupConsoleEditor(
	at c.ij.execution.impl.ConsoleViewImpl.doCreateConsoleEditor(
	at c.ij.execution.impl.ConsoleViewImpl.createConsoleEditor(
	at c.ij.execution.impl.ConsoleViewImpl.initConsoleEditor(


The error doesn’t look to have any relation with SonarLint.

I found many similar issues in JetBrains issue tracker, like this one:

The advice from JetBrains is:

The issue might be caused by some custom plugins you use. So you need to remove all the custom color schemes and plugins that produce them to resolve this issue.

I saw an alert in intellij that said an update is available for SonarLint. I clicked update. Saw restart intelij. Restarted it and intelij said cannot update plugin. Then I restarted system and opened intelij. That is when I saw the exception stack trace that I have shared with you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.