question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Put implicit parameter list in new line if characters in line exceeds the limit

See original GitHub issue

I think it would be very useful to have this configuration. Most of the times, when a method signature is very long, one wants to put in a new line a part of the declaration (and most of the times that’s an implicit parameter list). Also, this new line is usually indented.

Example:

def thisIsALongMethod[T](foo: String, bar: String, baz: Traversable[T])(implicit anotherArg: Foo[T]): Unit = { ??? }

would be converted into

def thisIsALongMethod[T](foo: String, bar: String, baz: Traversable[T])
  (implicit anotherArg: Foo[T]): Unit = { ??? }

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
godenjicommented, Oct 25, 2017

@mjaghouri a fix for #77 is in progress. It won’t be enforced automatically, but will allow param groups to exist on multiple lines (vs. forcing to single line as is the case now).

def foo[T]
  (a: A)
  (b: B)
  (implicit c: C)

This is in place on local dev branch. Working on Scala IDE integration, hope to have available within next couple of days, time permitting.

0reactions
godenjicommented, Oct 25, 2017

Fixed in 0.2.4, see the readme and this comment for details

Read more comments on GitHub >

github_iconTop Results From Across the Web

In python, how to tweak Black formatter, if possible?
Black defaults to 88 characters per line, which happens to be 10% over 80. ... auto-formatted code will exceed your allotted limit.
Read more >
Code style: Length of lines - Google Groups
Hello,. I noticed that when programming in Scala, I tend to write much longer lines than in imperative languages (eg. in Java). I...
Read more >
10 Implicit Parameters - Oracle Help Center
This chapter describes the implicit parameters used in REST service handlers that are not explicitly declared. Oracle REST Data Services (ORDS) adds these ......
Read more >
about Functions Advanced Parameters - PowerShell
You can add parameters to the advanced functions that you write, and use parameter attributes and arguments to limit the parameter values ...
Read more >
Data conversion parameters - Amazon Redshift
For example, you can use this parameter to escape the delimiter character, a quotation mark, an embedded newline character, or the escape character...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found