forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scala#12936 from BarkingBad/scaladoc/no-links-warn…
…ings Add no links warning setting to scaladoc
- Loading branch information
Showing
7 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package tests | ||
package noLinkWarnings | ||
|
||
/** | ||
* [[doesnt.exist]] | ||
* | ||
*/ | ||
class NoLinkWarnings | ||
|
||
|
||
/** | ||
* [[NoLinkWarnings]] | ||
*/ | ||
class Exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
scaladoc/test/dotty/tools/scaladoc/no-link-warnings/LinkWarningTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package dotty.tools.scaladoc | ||
package noLinkWarnings | ||
|
||
import org.junit.Assert.assertEquals | ||
|
||
class LinkWarningsTest extends ScaladocTest("noLinkWarnings"): | ||
|
||
override def args = Scaladoc.Args( | ||
name = "test", | ||
tastyFiles = tastyFiles(name), | ||
output = getTempDir().getRoot, | ||
projectVersion = Some("1.0") | ||
) | ||
|
||
override def runTest = afterRendering { | ||
val diagnostics = summon[DocContext].compilerContext.reportedDiagnostics | ||
assertEquals("There should be exactly one warning", 1, diagnostics.warningMsgs.size) | ||
assertNoErrors(diagnostics) | ||
} |
18 changes: 18 additions & 0 deletions
18
scaladoc/test/dotty/tools/scaladoc/no-link-warnings/NoLinkWarningsTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package dotty.tools.scaladoc | ||
package noLinkWarnings | ||
|
||
class NoLinkWarningsTest extends ScaladocTest("noLinkWarnings"): | ||
|
||
override def args = Scaladoc.Args( | ||
name = "test", | ||
tastyFiles = tastyFiles(name), | ||
output = getTempDir().getRoot, | ||
projectVersion = Some("1.0"), | ||
noLinkWarnings = true | ||
) | ||
|
||
override def runTest = afterRendering { | ||
val diagnostics = summon[DocContext].compilerContext.reportedDiagnostics | ||
assertNoWarning(diagnostics) | ||
assertNoErrors(diagnostics) | ||
} |