We started experimenting with Scala and the Play platform in my work. Set up our automatic casting and testing system first, and deployed Scalastyle to handle the first.
This was very useful, except that we are getting this particular lint error, which is hard for us to solve in a good way. A simple example:
def helloWorld = Action {
req =>
Ok("Hello World!")
}
Although often this can be much more complicated, of course (to the point where it’s hard to understand what the type really is).
In any case, this gives us the "Public method must have an explicit type" error from Scalastyle.
Unfortunately, setting the expected explicit type here usually causes a syntax error.
Any suggestions for a good solution for this? Or do we just need to enable this check for Play projects?
source
share