aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2016-04-06 12:14:41 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-04-07 11:44:31 +0000
commit4ef57dadd068abeee469a2bcaf98611b2a629a34 (patch)
treed31971f6d19050a1c59cfa9227aebf1c34d8b144 /src/main/java/com/google/devtools/build
parentf86ad5fe6b8b93ef8689e2eafff3674ce8b15142 (diff)
Skylark docs: fix ctx.file and ctx.files.
They were using "<ATTR>" which was parsed as a HTML tag. ctx.file appeared as: It is a shortcut for: list(ctx.attr..files)[0] ctx.files appeared as: It is a shortcut for: [f for t in ctx.attr. for f in t.files] -- MOS_MIGRATED_REVID=119149347
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
index 3b9935ea7f..bb12bb45ba 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
@@ -112,9 +112,9 @@ public final class SkylarkRuleContext {
"A <code>struct</code> containing files defined in label or label list "
+ "type attributes. The struct fields correspond to the attribute names. The struct "
+ "values are <code>list</code> of <code>file</code>s. If an optional attribute is "
- + "not specified in the rule, an empty list is generated."
+ + "not specified in the rule, an empty list is generated. "
+ "It is a shortcut for:"
- + "<pre class=language-python>[f for t in ctx.attr.<ATTR> for f in t.files]</pre>";
+ + "<pre class=language-python>[f for t in ctx.attr.&lt;ATTR&gt; for f in t.files]</pre>";
public static final String FILE_DOC =
"A <code>struct</code> containing files defined in label type "
+ "attributes marked as <code>single_file=True</code>. The struct fields correspond "
@@ -123,7 +123,7 @@ public final class SkylarkRuleContext {
+ "then the corresponding struct value is <code>None</code>. If a label type is not "
+ "marked as <code>single_file=True</code>, no corresponding struct field is generated. "
+ "It is a shortcut for:"
- + "<pre class=language-python>list(ctx.attr.<ATTR>.files)[0]</pre>";
+ + "<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).";