aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-03-20 14:54:23 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-23 11:51:24 +0000
commitc4cf9130e83b731becb287e898faf758c753f40a (patch)
tree665966d93fbe042929dfbb0b7d15f62dccf17bf7 /src/main/java/com/google/devtools/build/lib
parente00c8848776e9d93ab6653e194d308bb839e7250 (diff)
Skylark: proper anchor is generated for Boolean types in the documentation.
-- MOS_MIGRATED_REVID=89123292
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/MethodLibrary.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java2
2 files changed, 3 insertions, 2 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 3a457f9a76..f754ae8f1f 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
@@ -582,7 +582,8 @@ public class MethodLibrary {
@SkylarkBuiltin(name = "bool", returnType = Boolean.class, doc = "Converts an object to boolean. "
+ "It returns False if the object is None, False, an empty string, the number 0, or an "
- + "empty collection. Otherwise, it returns True.",
+ + "empty collection. Otherwise, it returns True. Similarly to Python <code>bool</code> "
+ + "is also a type.",
mandatoryParams = {@Param(name = "x", doc = "The variable to convert.")})
private static Function bool = new MixedModeFunction("bool",
ImmutableList.of("this"), 1, false) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
index 6b71f62b71..f173218727 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
@@ -192,7 +192,7 @@ public class SkylarkRuleClassFunctions {
optionalParams = {
@Param(name = "test", type = Boolean.class, doc = "Whether this rule is a test rule. "
+ "If True, the rule must end with <code>_test</code> (otherwise it cannot)."),
- @Param(name = "attrs", doc =
+ @Param(name = "attrs", type = Map.class, doc =
"dictionary to declare all the attributes of the rule. It maps from an attribute name "
+ "to an attribute object (see 'attr' module). Attributes starting with <code>_</code> "
+ "are private, and can be used to add an implicit dependency on a label."),