diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-04-15 16:27:12 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-04-15 16:27:12 -0700 |
commit | 0fde95e6a4c0659a59519399573ece0e684be660 (patch) | |
tree | e30cbe019b22aed8ba2d8860418b7eed48e2b854 /test/scaladoc/run/t5527.scala | |
parent | f6323d866f3b9a6fa9a5d0218a47922115974781 (diff) | |
download | scala-0fde95e6a4c0659a59519399573ece0e684be660.tar.gz scala-0fde95e6a4c0659a59519399573ece0e684be660.tar.bz2 scala-0fde95e6a4c0659a59519399573ece0e684be660.zip |
SI-7376 Scaladoc warns when discarding local doc comments with API tags
Double-star doc comments in non-dockable positions at the end of a block
will emit a warning only if API tags like @author are present, or under
-Xlint.
A real comment parser is applied early to probe for tags, to minimize
ad hoc testing or duplication, but warnings are suppressed. Residual
ad hockiness lies in precisely which tags to warn on. Ad hoc or ad doc.
This fix is a stop gap; a richer solution would also report about other
doc locations that won't be processed.
Diffstat (limited to 'test/scaladoc/run/t5527.scala')
-rw-r--r-- | test/scaladoc/run/t5527.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/scaladoc/run/t5527.scala b/test/scaladoc/run/t5527.scala index 2449ff60c3..af0c1f8d36 100644 --- a/test/scaladoc/run/t5527.scala +++ b/test/scaladoc/run/t5527.scala @@ -49,6 +49,29 @@ object Test extends DirectTest { case _ => false } + + def test5 { + /** @martin is this right? It shouldn't flag me as scaladoc. */ + if (true) ??? + } + + def test6 = { + /** Document this crucial constant for posterity. + * Don't forget to dedoc this comment if you refactor to a local. + * @author Paul Phillips + */ + val u = 4 + for (i <- 0 to u) + println(i) + } + def test7 = { + /** Some standard tags are tolerated locally and shouldn't trigger a warning. + * @note Don't change this unless you know what you're doing. This means you. + */ + val u = 4 + for (i <- 0 to u) + println(i) + } } /** comments that we should keep */ |