aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
diff options
context:
space:
mode:
authorGravatar vladmos <vladmos@google.com>2017-12-14 12:28:56 -0500
committerGravatar John Cater <jcater@google.com>2017-12-14 12:38:47 -0500
commit81a4948b88986359293c78d789dcbdd714caeab1 (patch)
tree4f00a4bf79fa353f56cc84a0a5e1c6abbc63a0d6 /src/main/java/com/google/devtools/build/lib/analysis
parentab97d786e9400b70c4513d5b5635fa676487cacf (diff)
Clarify types of `ctx.attr.<attr_name>` objects.
PiperOrigin-RevId: 179053724
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
index c80c7c1848..20bb7b895a 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
@@ -137,7 +137,9 @@ public final class SkylarkRuleContext implements SkylarkValue {
+ "<pre class=language-python>list(ctx.attr.&lt;ATTR&gt;.files)[0]</pre>";
public static final String ATTR_DOC =
"A struct to access the values of the attributes. The values are provided by "
- + "the user (if not, a default value is used).";
+ + "the user (if not, a default value is used). The attributes of the struct and the "
+ + "types of their values correspond to the keys and values of the <code>attrs</code> "
+ + "dict provided to the <code>rule</code> function.";
public static final String SPLIT_ATTR_DOC =
"A struct to access the values of attributes with split configurations. If the attribute is "
+ "a label list, the value of split_attr is a dict of the keys of the split (as strings) "