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

Problematic indent? #109

Open
betaorbust opened this issue Apr 8, 2021 · 1 comment
Open

Problematic indent? #109

betaorbust opened this issue Apr 8, 2021 · 1 comment

Comments

@betaorbust
Copy link

I have the following code, which seems to be triggering some strange behaviors around the indent rule.

  1. It's incorrectly flagging the indent on the return statement, but only in the VSCode plugin. The cli says no errors.
  2. It's impossible to turn off. Even setting all rules to empty in both .groovylintrc.json and groovylintrc-format.json it still triggers.
public class Test {
    public static Observable<Something> testing() {
        return api
            .flatMap({ Map something -> 
                if (!something) {
                    // This return is reported as being on the wrong level
                    return Observable.empty()
                }
            })
            // This next part is required to trigger the bug. If you delete it, the above return statement
            // is detected as being at the correct indent level 🤯 
            .flatMap()
    }
}

Screen Shot 2021-04-08 at 12 09 59 AM

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

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

No branches or pull requests

1 participant