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.
We are using Scalastyle along with Scalafmt. In our codebase, we have at least one instance of this:
In the case of a long function declaration like this, Scalastyle, using Scalariform, complains about rule
NoWhitespaceBeforeLeftBracketChecker
being broken, since there is a space afterADT
. However, the arguments toADT
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.