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

NoWhitespaceBeforeLeftBracketChecker on multiple lines #285

Open
vegarsti opened this issue Aug 20, 2019 · 0 comments
Open

NoWhitespaceBeforeLeftBracketChecker on multiple lines #285

vegarsti opened this issue Aug 20, 2019 · 0 comments

Comments

@vegarsti
Copy link

vegarsti commented Aug 20, 2019

We are using Scalastyle along with Scalafmt. In our codebase, we have at least one instance of this:

    private def someFunctionName(
        argument: ADT[
            OneDataType,
            AnotherDataType,
            AThirdDataType,

In the case of a long function declaration like this, Scalastyle, using Scalariform, complains about rule NoWhitespaceBeforeLeftBracketChecker being broken, since there is a space after ADT. However, the arguments to ADT are so long that Scalafmt breaks it into multiple lines. Thus, Scalastyle complains.

Is there a good fix for this? One way is to disable this specific rule, but when it doesn't apply to multiple lines, it's a good rule. Another fix is of course to create a class for this argument such that it fits in one line.

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

No branches or pull requests

1 participant