warning: function.md:226:5: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method getLines,
or remove the empty argument list from its definition (Java-defined methods are exempt).
In Scala 3, an unapplied method like this will be eta-expanded into a function. [quickfixable]
file.getLines.foreach(println)
^^^^^^^^^^^^^