aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkAttr.java6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java
index 4430ba7f87..05914afc4e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java
@@ -661,7 +661,7 @@ public class MethodLibrary {
};
@SkylarkBuiltin(name = "range", returnType = SkylarkList.class,
- doc = "Creates a list where items go from <code>start</code> to <code>end</code>, using a "
+ doc = "Creates a list where items go from <code>start</code> to <code>stop</code>, using a "
+ "<code>step</code> increment. If a single argument is provided, items will "
+ "range from 0 to that element."
+ "<pre class=language-python>range(4) == [0, 1, 2, 3]\n"
@@ -672,9 +672,9 @@ public class MethodLibrary {
doc = "Value of the first element"),
},
optionalParams = {
- @Param(name = "end", type = Integer.class,
+ @Param(name = "stop", type = Integer.class,
doc = "The first item <i>not</i> to be included in the resulting list; "
- + "generation of the list stops before <code>end</code> is reached."),
+ + "generation of the list stops before <code>stop</code> is reached."),
@Param(name = "step", type = Integer.class,
doc = "The increment (default is 1). It may be negative.")})
private static final Function range =
@@ -686,10 +686,10 @@ public class MethodLibrary {
int stop;
if (args[1] == null) {
start = 0;
- stop = Type.INTEGER.convert(args[0], "end");
+ stop = Type.INTEGER.convert(args[0], "stop");
} else {
start = Type.INTEGER.convert(args[0], "start");
- stop = Type.INTEGER.convert(args[1], "end");
+ stop = Type.INTEGER.convert(args[1], "stop");
}
int step = args[2] == null ? 1 : Type.INTEGER.convert(args[2], "step");
if (step == 0) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkAttr.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkAttr.java
index 4907ad83ab..97e0fd2863 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkAttr.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkAttr.java
@@ -55,8 +55,8 @@ public final class SkylarkAttr {
+ "a FileType filter.";
private static final String ALLOW_RULES_DOC =
- "which rule targets (name of the classes) are allowed. "
- + "This is deprecated (kept only for compatiblity), use providers instead.";
+ "which rule targets (name of the classes) are allowed. This is deprecated (kept only for "
+ + "compatiblity), use providers instead.";
private static final String FLAGS_DOC =
"deprecated, will be removed";
@@ -69,7 +69,7 @@ public final class SkylarkAttr {
+ "For example, use DATA_CFG or HOST_CFG.";
private static final String EXECUTABLE_DOC =
- "set to True if the labels have to be executable. This means the label refers to an "
+ "set to True if the labels have to be executable. This means the label must refer to an "
+ "executable file, or to a rule that outputs an executable file. Access the labels with "
+ "<code>ctx.executable.&lt;attribute_name&gt;</code>.";