You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create test modules under technology root warnings
The two test created are testModuleUnderAncestorOfTechnologyRoot, and
testModuleUnderTechnologyRoot. These test verify that technology roots,
nor ancestors of technology roots generate errors when linking to a
module.
testCrawlDiagnostics() already verifies that regular articles generate
an error when linking to modules. So creating that testcase is not needed.
Issue: 735
hasTechnologyRoot = hasTechnologyRoot || context.pathsTo(nodeReference).contains { path in
240
242
if path.count ==0{
241
243
returnfalse
242
244
}
@@ -246,7 +248,7 @@ struct DocumentationCurator {
246
248
}
247
249
248
250
if !hasTechnologyRoot {
249
-
problems.append(Problem(diagnostic:Diagnostic(source:source(), severity:.warning, range:range(), identifier:"org.swift.docc.ModuleCuration", summary:"Linking to \((link.destination ??"").singleQuoted) from a Topics group in \(nodeReference.absoluteString.singleQuoted) isn't allowed", explanation:"The former is a module, and modules only exist at the root"), possibleSolutions:[]))
251
+
problems.append(Problem(diagnostic:Diagnostic(source:source(), severity:.warning, range:range(), identifier:"org.swift.docc.ModuleCuration", summary:"Linking to \((link.destination ??"").singleQuoted) from a Topics group in \(nodeReference.absoluteString.singleQuoted) isn't allowed", explanation:"The former is a module test, and modules only exist at the root"), possibleSolutions:[]))
0 commit comments