File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed
test/dotty/tools/scaladoc/no-link-warnings Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ object Scaladoc:
43
43
docCanonicalBaseUrl : String = " " ,
44
44
documentSyntheticTypes : Boolean = false ,
45
45
snippetCompiler : List [String ] = Nil ,
46
- includeNoLinkWarnings : Boolean = false ,
46
+ noLinkWarnings : Boolean = false ,
47
47
versionsDictionaryUrl : Option [String ] = None ,
48
48
generateInkuire : Boolean = false ,
49
49
apiSubdirectory : Boolean = false ,
Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ trait SiteRenderer(using DocContext) extends Locations:
58
58
.orElse(asStaticSite)
59
59
.orElse(asAsset)
60
60
.getOrElse {
61
- report.warn(s " Unable to resolve link ' $str' " , content.template.templateFile.file)
62
- str
61
+ if (! summon[DocContext ].args.noLinkWarnings)
62
+ report.warn(s " Unable to resolve link ' $str' " , content.template.templateFile.file)
63
+ str
63
64
}
64
65
65
66
def processLocalLinkWithGuard (str : String ): String =
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ abstract class MarkupConversion[T](val repr: Repr)(using dctx: DocContext) {
116
116
val txt = s " No DRI found for query "
117
117
val msg = s " $txt: $queryStr"
118
118
119
- if (! summon[DocContext ].args.includeNoLinkWarnings ) then
119
+ if (! summon[DocContext ].args.noLinkWarnings ) then
120
120
121
121
report.warning(msg, srcPos)
122
122
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ trait MemberLookup {
86
86
res
87
87
catch
88
88
case e : Exception =>
89
- if (! summon[DocContext ].args.includeNoLinkWarnings ) then
89
+ if (! summon[DocContext ].args.noLinkWarnings ) then
90
90
val msg = s " Unable to find a link for ${query} ${ownerOpt.fold(" " )(o => " in " + o.name)}"
91
91
report.warn(msg, e)
92
92
None
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ class NoLinkWarningsTest extends ScaladocTest("noLinkWarnings"):
8
8
tastyFiles = tastyFiles(name),
9
9
output = getTempDir().getRoot,
10
10
projectVersion = Some (" 1.0" ),
11
- includeNoLinkWarnings = true
11
+ noLinkWarnings = true
12
12
)
13
13
14
14
override def runTest = afterRendering {
You can’t perform that action at this time.
0 commit comments