Don't generate documentation for attributes which are marked undocumented.
I diffed the build encyclopedia before and after this change, and the only
difference is that the inline_constants attribute disappears from the Android
rule documentation, and this attribute is correctly marked undocumented.
RELNOTES: None
@@ -194,6 +194,9 @@ public class BuildDocCollector {
Class<? extends RuleDefinition> ruleDefinition =
ruleClassProvider.getRuleClassDefinition(ruleDoc.getRuleName()).getClass();
for (Attribute attribute : ruleClass.getAttributes()) {
+ if (!attribute.isDocumented()) {
+ continue;
+ }
String attrName = attribute.getName();
List<RuleDocumentationAttribute> attributeDocList =
attributeDocEntries.get(attrName);
