Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive indent after updating from 0.47.1 #1830

Closed
piotrp opened this issue Feb 20, 2023 · 0 comments · Fixed by #1856
Closed

False positive indent after updating from 0.47.1 #1830

piotrp opened this issue Feb 20, 2023 · 0 comments · Fixed by #1856

Comments

@piotrp
Copy link

piotrp commented Feb 20, 2023

Expected Behavior

Following code should pass indent validation:

    private fun test(): Boolean? =
        runCatching { true }
            .getOrNull()?.let { result ->
                !result
            }

It's also how IDEA indents code.

Observed Behavior

0.48.2 and current master (44ad030) return:

[LintError(line=4, col=1, ruleId=standard:indent, detail=Unexpected indentation (12) (should be 8), canBeAutoCorrected=true),
    LintError(line=5, col=1, ruleId=standard:indent, detail=Unexpected indentation (8) (should be 4), canBeAutoCorrected=true)]

This snippet was accepted by 0.47.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants