Skip to content

Scaladoc should validate scaladocs #17676

@ckipp01

Description

@ckipp01

One feature I always wanted with my Scaladocs was a way to validate that my scaladoc isn't out of date with my actual code. Take the following example:

  /** Here is my foo method
    *
    * @param a
    *   the first arg
    * @param b
    *   the second arg
    * @return
    *   the return value
    */
  private def foo(a: Int, c: Int): Int = ???

This is incorrect. Maybe it was correct at some point in time, but b changed to c and therefore my scaladocs are now wrong. When I run scaladoc on this I won't get any warning about mismatched code and scaladoc. It'd be amazing if you could run like --validate or something when running Scaladoc and get something like:

Mismatched Scaladoc

Found: param b

But param "b" ins't a parameter in "foo". Did you mean "c"?

Or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions