Configure scaladoc to include extension methods

263 Views Asked by At

Can I configure scaladoc to include methods from implicit conversions by specifying the implicit conversion?

E.g. given

trait Foo

object Operations {
  implicit class FooOps(val f: Foo) extends AnyVal {
    def bar = 33
  }
}

Can I make scaladoc include extension method bar in the documentation of Foo?

1

There are 1 best solutions below

3
On

It appears so (I've not tried it yet):

% scladoc -help
Usage: scaladoc <options> <source files>
where possible scaladoc options include:
  ...
  -implicits                    Document members inherited by implicit conversions.
  -implicits-hide:<implicit(s)> Hide the members inherited by the given comma separated, fully qualified implicit conversions. Add dot (.) to include default conversions.
  -implicits-show-all           Show members inherited by implicit conversions that are impossible in the default scope. (for example conversions that require Numeric[String] to be in scope)
  ...