This check looks for cases where the indentation suggests a grouping that isn't actually there in the code. A common example of this would be something like if (column > width) line++ column = 0 Here, the
column = 0 line will be executed every single time, not just if the condition is true.
Issue id: SuspiciousIndentation
always-run (default is false):
Whether this check should be included while editing.
While you're editing, it's common to have a temporary situation where you have suspicious indentation scenarios -- e.g. you start typing an
if statement on the line above something you want to make conditional, and you haven't indented it yet. It can be distracting and misleading to suddenly have both statements light up as errors. Therefore, lint will avoid including this check when running on the fly in the editor, unless it looks like the file has not been recently edited. With this option, you can turn it on in all cases.
To configure this option, use a
lint.xml file with an <option> like this:
<lint> <issue id="SuspiciousIndentation"> <option name="always-run" value="false" /> </issue> </lint>
IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3
Android, 2022.3.1 Beta 2