Scalafix

Scalafix

  • User guide
  • Developer guide
  • Browse sources
  • GitHub

›Rules

Usage

  • Installation
  • Configuration
  • Suppressing rules

Rules

  • All rules
  • RemoveUnused
  • DisableSyntax
  • NoAutoTupling
  • LeakingImplicitClassVal
  • NoValInForComprehension
  • ProcedureSyntax

Misc

  • Related projects
Edit

ProcedureSyntax

"Procedure syntax" is a deprecated Scala feature that allows methods to leave out the result type and assignment character =. For example,

def debug { println("debug") }

This rule replaces procedure syntax with an explicit : Unit result type for both method implementations and abstract declaration.

// before: procedure syntax
def main(args: Seq[String]) { println("Hello world!") }
trait A { def doSomething }

// after: regular syntax
def main(args: Seq[String]): Unit = { println("Hello world!") }
trait A { def doSomething: Unit }
← PreviousNext →
Scalafix
Docs
Get startedRulesExtend Scalafix
Community
Chat on GitterDiscuss on Scala Users
More
GitHub
Copyright © 2018 Scala Center