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

Synchronized definitions which exceed 100 columns #17

Open
mgyucht opened this issue Nov 13, 2015 · 2 comments
Open

Synchronized definitions which exceed 100 columns #17

mgyucht opened this issue Nov 13, 2015 · 2 comments

Comments

@mgyucht
Copy link

mgyucht commented Nov 13, 2015

Consider the first line of an implementation method like this:

                                                                                                    | <- 100 columns
  override def moveObject(audit: AuditInfo, source: String, destination: String): Unit = synchronized {

Is the appropriate style to change this to something like

                                                                                                    | <- 100 columns
  override def moveObject(audit: AuditInfo, source: String, destination: String): Unit = {
    synchronized {

or

                                                                                                    | <- 100 columns
  override def moveObject(audit: AuditInfo, source: String, destination: String): Unit =
    synchronized {

If we remove the outermost block, the inner indentation level will be one stop closer to the left margin.

@rxin
Copy link
Contributor

rxin commented Nov 13, 2015

I think either could work. No strong opinion here.

@aarondav
Copy link
Contributor

I consider the first slightly preferable for the same reason why we prefer braces around defs which are not one-liners.

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

3 participants