aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkendalllaneee <39970312+kendalllaneee@users.noreply.github.com>2019-08-07 18:37:18 -0400
committerc-parsons <cparsons@google.com>2019-08-07 18:37:18 -0400
commit2f1a5ab505ba501fdfeb9162defbb3b91da11e76 (patch)
tree668e16aa561f38052e2d15c7bb87c2d6ced9b3d3
parentac4645d265057bddc186305707f6c2859ca1848a (diff)
downloadstardoc-2f1a5ab505ba501fdfeb9162defbb3b91da11e76.tar.gz
Update rule.vm to document the providers that a rule attribute requires (#219)
-rw-r--r--stardoc/templates/rule.vm5
-rwxr-xr-xtest/self_doc_golden.md3
2 files changed, 8 insertions, 0 deletions
diff --git a/stardoc/templates/rule.vm b/stardoc/templates/rule.vm
index 06ff16f..71e0999 100644
--- a/stardoc/templates/rule.vm
+++ b/stardoc/templates/rule.vm
@@ -27,6 +27,11 @@ ${util.htmlEscape($ruleInfo.docString)}
${attribute.docString.trim()}
</p>
#end
+#if (!$attribute.getProviderNameGroupList().isEmpty())
+ <p>
+ The dependencies of this attribute must provide: ${util.attributeProviders($attribute)}
+ </p>
+#end
</td>
</tr>
#end
diff --git a/test/self_doc_golden.md b/test/self_doc_golden.md
index 0982ae5..4a60c45 100755
--- a/test/self_doc_golden.md
+++ b/test/self_doc_golden.md
@@ -47,6 +47,9 @@ This rule is an experimental replacement for the existing skylark_doc rule.
<p>
A list of skylark_library dependencies which the input depends on.
</p>
+ <p>
+ The dependencies of this attribute must provide: StarlarkLibraryInfo
+ </p>
</td>
</tr>
<tr id="stardoc-format">