aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Eagle <eagle@post.harvard.edu>2021-09-24 08:24:43 -0700
committerGitHub <noreply@github.com>2021-09-24 11:24:43 -0400
commiteabe5f7fe9ad744f0074d61c65fb29dd3d228a68 (patch)
treeea3822d3946507f517b4c0db3cdb0c56758bd9d2
parent43a545a67ea2b9673365745b1b5372170d730922 (diff)
downloadbazel-skylib-eabe5f7fe9ad744f0074d61c65fb29dd3d228a68.tar.gz
Run regenerate_docs.sh (#297)
Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com> (merge conflict fixes)
-rwxr-xr-xdocs/analysis_test_doc.md35
-rwxr-xr-xdocs/build_test_doc.md49
-rwxr-xr-xdocs/collections_doc.md103
-rwxr-xr-xdocs/common_settings_doc.md242
-rwxr-xr-xdocs/copy_file_doc.md82
-rwxr-xr-xdocs/dicts_doc.md39
-rwxr-xr-xdocs/diff_test_doc.md58
-rwxr-xr-xdocs/native_binary_doc.md129
-rwxr-xr-xdocs/paths_doc.md243
-rwxr-xr-xdocs/regenerate_docs.sh2
-rwxr-xr-xdocs/run_binary_doc.md75
-rwxr-xr-xdocs/selects_doc.md112
-rwxr-xr-xdocs/shell_doc.md57
-rwxr-xr-xdocs/structs_doc.md29
-rwxr-xr-xdocs/types_doc.md263
-rwxr-xr-xdocs/unittest_doc.md770
-rwxr-xr-xdocs/versions_doc.md152
-rwxr-xr-xdocs/write_file_doc.md82
18 files changed, 635 insertions, 1887 deletions
diff --git a/docs/analysis_test_doc.md b/docs/analysis_test_doc.md
index 817be66..6585e29 100755
--- a/docs/analysis_test_doc.md
+++ b/docs/analysis_test_doc.md
@@ -1,4 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
<a name="#analysis_test"></a>
+
## analysis_test
<pre>
@@ -32,30 +35,12 @@ Test rule checking that other targets can be successfully analyzed.
name: The name of the test rule.
targets: A list of targets to ensure build.
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysis_test-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="analysis_test-targets">
- <td><code>targets</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a>; required
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| targets | - | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | required | |
diff --git a/docs/build_test_doc.md b/docs/build_test_doc.md
index b1cd020..6b0d629 100755
--- a/docs/build_test_doc.md
+++ b/docs/build_test_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#build_test"></a>
+
## build_test
<pre>
@@ -10,9 +14,6 @@ This works not by an instance of this test failing, but instead by
the targets it depends on failing to build, and hence failing
the attempt to run this test.
-NOTE: At the moment, this won't work on Windows; but someone adding
-support would be welcomed.
-
Typical usage:
```
@@ -26,42 +27,12 @@ Typical usage:
```
-### Parameters
+**PARAMETERS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="build_test-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the test rule.
- </p>
- </td>
- </tr>
- <tr id="build_test-targets">
- <td><code>targets</code></td>
- <td>
- required.
- <p>
- A list of targets to ensure build.
- </p>
- </td>
- </tr>
- <tr id="build_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The name of the test rule. | none |
+| targets | A list of targets to ensure build. | none |
+| kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/collections_doc.md b/docs/collections_doc.md
index 64ffb5e..1b54e34 100755
--- a/docs/collections_doc.md
+++ b/docs/collections_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#collections.after_each"></a>
+
## collections.after_each
<pre>
@@ -6,35 +10,16 @@ collections.after_each(<a href="#collections.after_each-separator">separator</a>
Inserts `separator` after each item in `iterable`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.after_each-separator">
- <td><code>separator</code></td>
- <td>
- required.
- <p>
- The value to insert after each item in `iterable`.
- </p>
- </td>
- </tr>
- <tr id="collections.after_each-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- The list into which to intersperse the separator.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| separator | The value to insert after each item in <code>iterable</code>. | none |
+| iterable | The list into which to intersperse the separator. | none |
+
+<a name="#collections.before_each"></a>
## collections.before_each
@@ -44,36 +29,17 @@ collections.before_each(<a href="#collections.before_each-separator">separator</
Inserts `separator` before each item in `iterable`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.before_each-separator">
- <td><code>separator</code></td>
- <td>
- required.
- <p>
- The value to insert before each item in `iterable`.
- </p>
- </td>
- </tr>
- <tr id="collections.before_each-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- The list into which to intersperse the separator.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| separator | The value to insert before each item in <code>iterable</code>. | none |
+| iterable | The list into which to intersperse the separator. | none |
+
+
+<a name="#collections.uniq"></a>
+
## collections.uniq
<pre>
@@ -85,24 +51,11 @@ Returns a list of unique elements in `iterable`.
Requires all the elements to be hashable.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="collections.uniq-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- An iterable to filter.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| iterable | An iterable to filter. | none |
diff --git a/docs/common_settings_doc.md b/docs/common_settings_doc.md
index 676f070..41271c7 100755
--- a/docs/common_settings_doc.md
+++ b/docs/common_settings_doc.md
@@ -10,25 +10,12 @@ bool_flag(<a href="#bool_flag-name">name</a>)
A bool-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="bool_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#bool_setting"></a>
@@ -41,25 +28,12 @@ bool_setting(<a href="#bool_setting-name">name</a>)
A bool-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="bool_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#int_flag"></a>
@@ -72,25 +46,12 @@ int_flag(<a href="#int_flag-name">name</a>)
An int-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="int_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#int_setting"></a>
@@ -103,25 +64,12 @@ int_setting(<a href="#int_setting-name">name</a>)
An int-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="int_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#string_flag"></a>
@@ -134,34 +82,13 @@ string_flag(<a href="#string_flag-name">name</a>, <a href="#string_flag-values">
A string-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="string_flag-values">
- <td><code>values</code></td>
- <td>
- List of strings; optional
- <p>
- The list of allowed values for this setting. An error is raised if any other value is given.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] |
<a name="#string_list_flag"></a>
@@ -174,25 +101,12 @@ string_list_flag(<a href="#string_list_flag-name">name</a>)
A string list-typed build setting that can be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_list_flag-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#string_list_setting"></a>
@@ -205,25 +119,12 @@ string_list_setting(<a href="#string_list_setting-name">name</a>)
A string list-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_list_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
<a name="#string_setting"></a>
@@ -236,34 +137,13 @@ string_setting(<a href="#string_setting-name">name</a>, <a href="#string_setting
A string-typed build setting that cannot be set on the command line
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="string_setting-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="string_setting-values">
- <td><code>values</code></td>
- <td>
- List of strings; optional
- <p>
- The list of allowed values for this setting. An error is raised if any other value is given.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] |
<a name="#BuildSettingInfo"></a>
@@ -276,21 +156,11 @@ BuildSettingInfo(<a href="#BuildSettingInfo-value">value</a>)
A singleton provider that contains the raw value of a build setting
-### Fields
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="BuildSettingInfo-value">
- <td><code>value</code></td>
- <td>
- <p>The value of the build setting in the current configuration. This value may come from the command line or an upstream transition, or else it will be the build setting's default.</p>
- </td>
- </tr>
- </tbody>
-</table>
+**FIELDS**
+
+
+| Name | Description |
+| :-------------: | :-------------: |
+| value | The value of the build setting in the current configuration. This value may come from the command line or an upstream transition, or else it will be the build setting's default. |
diff --git a/docs/copy_file_doc.md b/docs/copy_file_doc.md
index 67148bc..52f10a5 100755
--- a/docs/copy_file_doc.md
+++ b/docs/copy_file_doc.md
@@ -15,78 +15,16 @@ Copies a file to another location.
This rule uses a Bash command on Linux/macOS/non-Windows, and a cmd.exe command on Windows (no Bash is required).
-### Parameters
+**PARAMETERS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="copy_file-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- Name of the rule.
- </p>
- </td>
- </tr>
- <tr id="copy_file-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- A Label. The file to make a copy of. (Can also be the label of a rule
- that generates a file.)
- </p>
- </td>
- </tr>
- <tr id="copy_file-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- Path of the output file, relative to this package.
- </p>
- </td>
- </tr>
- <tr id="copy_file-is_executable">
- <td><code>is_executable</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to make the output file executable. When
- True, the rule's output can be executed using `bazel run` and can be
- in the srcs of binary and test rules that require executable sources.
- WARNING: If `allow_symlink` is True, `src` must also be executable.
- </p>
- </td>
- </tr>
- <tr id="copy_file-allow_symlink">
- <td><code>allow_symlink</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to allow symlinking instead of copying.
- When False, the output is always a hard copy. When True, the output
- *can* be a symlink, but there is no guarantee that a symlink is
- created (i.e., at the time of writing, we don't create symlinks on
- Windows). Set this to True if you need fast copying and your tools can
- handle symlinks (which most UNIX tools can).
- </p>
- </td>
- </tr>
- <tr id="copy_file-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- further keyword arguments, e.g. `visibility`
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | Name of the rule. | none |
+| src | A Label. The file to make a copy of. (Can also be the label of a rule that generates a file.) | none |
+| out | Path of the output file, relative to this package. | none |
+| is_executable | A boolean. Whether to make the output file executable. When True, the rule's output can be executed using <code>bazel run</code> and can be in the srcs of binary and test rules that require executable sources. WARNING: If <code>allow_symlink</code> is True, <code>src</code> must also be executable. | <code>False</code> |
+| allow_symlink | A boolean. Whether to allow symlinking instead of copying. When False, the output is always a hard copy. When True, the output *can* be a symlink, but there is no guarantee that a symlink is created (i.e., at the time of writing, we don't create symlinks on Windows). Set this to True if you need fast copying and your tools can handle symlinks (which most UNIX tools can). | <code>False</code> |
+| kwargs | further keyword arguments, e.g. <code>visibility</code> | none |
diff --git a/docs/dicts_doc.md b/docs/dicts_doc.md
index 2e95cf8..0b54243 100755
--- a/docs/dicts_doc.md
+++ b/docs/dicts_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#dicts.add"></a>
+
## dicts.add
<pre>
@@ -15,33 +19,12 @@ special cases for their inputs: the sum of zero dictionaries is the empty
dictionary, and the sum of a single dictionary is a copy of itself.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="dicts.add-dictionaries">
- <td><code>dictionaries</code></td>
- <td>
- optional.
- <p>
- Zero or more dictionaries to be added.
- </p>
- </td>
- </tr>
- <tr id="dicts.add-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- Additional dictionary passed as keyword args.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| dictionaries | Zero or more dictionaries to be added. | none |
+| kwargs | Additional dictionary passed as keyword args. | none |
diff --git a/docs/diff_test_doc.md b/docs/diff_test_doc.md
index a031145..cf1c2c5 100755
--- a/docs/diff_test_doc.md
+++ b/docs/diff_test_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#diff_test"></a>
+
## diff_test
<pre>
@@ -9,51 +13,13 @@ A test that compares two files.
The test succeeds if the files' contents match.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="diff_test-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the test rule.
- </p>
- </td>
- </tr>
- <tr id="diff_test-file1">
- <td><code>file1</code></td>
- <td>
- required.
- <p>
- Label of the file to compare to <code>file2</code>.
- </p>
- </td>
- </tr>
- <tr id="diff_test-file2">
- <td><code>file2</code></td>
- <td>
- required.
- <p>
- Label of the file to compare to <code>file1</code>.
- </p>
- </td>
- </tr>
- <tr id="diff_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The name of the test rule. | none |
+| file1 | Label of the file to compare to &lt;code&gt;file2&lt;/code&gt;. | none |
+| file2 | Label of the file to compare to &lt;code&gt;file1&lt;/code&gt;. | none |
+| kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/native_binary_doc.md b/docs/native_binary_doc.md
index 742e81b..a610c3a 100755
--- a/docs/native_binary_doc.md
+++ b/docs/native_binary_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#native_binary"></a>
+
## native_binary
<pre>
@@ -9,59 +13,19 @@ Wraps a pre-built binary or script with a binary rule.
You can "bazel run" this rule like any other binary rule, and use it as a tool in genrule.tools for example. You can also augment the binary with runfiles.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="native_binary-name">
- <td><code>name</code></td>
- <td>
- required.
- </td>
- </tr>
- <tr id="native_binary-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- label; path of the pre-built executable
- </p>
- </td>
- </tr>
- <tr id="native_binary-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.)
- </p>
- </td>
- </tr>
- <tr id="native_binary-data">
- <td><code>data</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- list of labels; data dependencies
- </p>
- </td>
- </tr>
- <tr id="native_binary-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-binaries">common attributes for binaries</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The name of the test rule. | none |
+| src | label; path of the pre-built executable | none |
+| out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none |
+| data | list of labels; data dependencies | <code>None</code> |
+| kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-binaries"&gt;common attributes for binaries&lt;/a&gt;. | none |
+
+
+<a name="#native_test"></a>
## native_test
@@ -75,57 +39,14 @@ You can "bazel test" this rule like any other test rule. You can also augment th
runfiles.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="native_test-name">
- <td><code>name</code></td>
- <td>
- required.
- </td>
- </tr>
- <tr id="native_test-src">
- <td><code>src</code></td>
- <td>
- required.
- <p>
- label; path of the pre-built executable
- </p>
- </td>
- </tr>
- <tr id="native_test-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.)
- </p>
- </td>
- </tr>
- <tr id="native_test-data">
- <td><code>data</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- list of labels; data dependencies
- </p>
- </td>
- </tr>
- <tr id="native_test-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The name of the test rule. | none |
+| src | label; path of the pre-built executable | none |
+| out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none |
+| data | list of labels; data dependencies | <code>None</code> |
+| kwargs | The &lt;a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests"&gt;common attributes for tests&lt;/a&gt;. | none |
diff --git a/docs/paths_doc.md b/docs/paths_doc.md
index 8797c01..cd19358 100755
--- a/docs/paths_doc.md
+++ b/docs/paths_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#paths.basename"></a>
+
## paths.basename
<pre>
@@ -12,27 +16,16 @@ the Unix `basename` command (which would return the path segment preceding
the final slash).
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.basename-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose basename should be returned.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| p | The path whose basename should be returned. | none |
+<a name="#paths.dirname"></a>
+
## paths.dirname
<pre>
@@ -46,26 +39,15 @@ The dirname is the portion of `p` up to but not including the file portion
included, unless omitting them would make the dirname empty.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| p | The path whose dirname should be returned. | none |
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.dirname-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose dirname should be returned.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+<a name="#paths.is_absolute"></a>
## paths.is_absolute
@@ -75,27 +57,16 @@ paths.is_absolute(<a href="#paths.is_absolute-path">path</a>)
Returns `True` if `path` is an absolute path.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.is_absolute-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path (which is a string).
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| path | A path (which is a string). | none |
+
+
+<a name="#paths.join"></a>
+
## paths.join
<pre>
@@ -113,36 +84,17 @@ already ends in a separator.
If any component is an absolute path, all previous components are discarded.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.join-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path segment.
- </p>
- </td>
- </tr>
- <tr id="paths.join-others">
- <td><code>others</code></td>
- <td>
- optional.
- <p>
- Additional path segments.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| path | A path segment. | none |
+| others | Additional path segments. | none |
+<a name="#paths.normalize"></a>
+
## paths.normalize
<pre>
@@ -166,26 +118,15 @@ POSIX platforms; specifically:
- Multiple adjacent internal slashes are collapsed into a single slash.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| path | A path. | none |
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.normalize-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- A path.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+<a name="#paths.relativize"></a>
## paths.relativize
@@ -204,35 +145,16 @@ Relativizing paths that start with parent directory references only works if
the path both start with the same initial parent references.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.relativize-path">
- <td><code>path</code></td>
- <td>
- required.
- <p>
- The path to relativize.
- </p>
- </td>
- </tr>
- <tr id="paths.relativize-start">
- <td><code>start</code></td>
- <td>
- required.
- <p>
- The ancestor path against which to relativize.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| path | The path to relativize. | none |
+| start | The ancestor path against which to relativize. | none |
+
+<a name="#paths.replace_extension"></a>
## paths.replace_extension
@@ -245,37 +167,17 @@ Replaces the extension of the file at the end of a path.
If the path has no extension, the new extension is added to it.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.replace_extension-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose extension should be replaced.
- </p>
- </td>
- </tr>
- <tr id="paths.replace_extension-new_extension">
- <td><code>new_extension</code></td>
- <td>
- required.
- <p>
- The new extension for the file. The new extension should
- begin with a dot if you want the new filename to have one.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| p | The path whose extension should be replaced. | none |
+| new_extension | The new extension for the file. The new extension should begin with a dot if you want the new filename to have one. | none |
+
+
+<a name="#paths.split_extension"></a>
+
## paths.split_extension
<pre>
@@ -288,24 +190,11 @@ Leading periods on the basename are ignored, so
`path.split_extension(".bashrc")` returns `(".bashrc", "")`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="paths.split_extension-p">
- <td><code>p</code></td>
- <td>
- required.
- <p>
- The path whose root and extension should be split.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| p | The path whose root and extension should be split. | none |
diff --git a/docs/regenerate_docs.sh b/docs/regenerate_docs.sh
index 2ab9a08..26f397a 100755
--- a/docs/regenerate_docs.sh
+++ b/docs/regenerate_docs.sh
@@ -19,7 +19,7 @@
set -euo pipefail
-bazel build docs:all --experimental_remap_main_repo
+bazel build docs:all
for filename in bazel-bin/docs/*_gen.md; do
target_filename="$(echo $filename | sed -En "s/bazel-bin\/(.*)_gen.md/\1/p").md"
diff --git a/docs/run_binary_doc.md b/docs/run_binary_doc.md
index cde8b40..9d7bb99 100755
--- a/docs/run_binary_doc.md
+++ b/docs/run_binary_doc.md
@@ -1,4 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
<a name="#run_binary"></a>
+
## run_binary
<pre>
@@ -7,69 +10,15 @@ run_binary(<a href="#run_binary-name">name</a>, <a href="#run_binary-args">args<
Runs a binary as a build action.<br/><br/>This rule does not require Bash (unlike <code>native.genrule</code>).
-### Attributes
+**ATTRIBUTES**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="run_binary-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="run_binary-args">
- <td><code>args</code></td>
- <td>
- List of strings; optional
- <p>
- Command line arguments of the binary.<br/><br/>Subject to<code><a href="https://docs.bazel.build/versions/main/be/make-variables.html#location">$(location)</a></code> expansion.
- </p>
- </td>
- </tr>
- <tr id="run_binary-env">
- <td><code>env</code></td>
- <td>
- <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a>; optional
- <p>
- Environment variables of the action.<br/><br/>Subject to <code><a href="https://docs.bazel.build/versions/main/be/make-variables.html#location">$(location)</a></code> expansion.
- </p>
- </td>
- </tr>
- <tr id="run_binary-outs">
- <td><code>outs</code></td>
- <td>
- List of labels; required
- <p>
- Output files generated by the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- <tr id="run_binary-srcs">
- <td><code>srcs</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a>; optional
- <p>
- Additional inputs of the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- <tr id="run_binary-tool">
- <td><code>tool</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; required
- <p>
- The tool to run in the action.<br/><br/>Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| args | Command line arguments of the binary.&lt;br/&gt;&lt;br/&gt;Subject to&lt;code&gt;&lt;a href="https://docs.bazel.build/versions/main/be/make-variables.html#location"&gt;$(location)&lt;/a&gt;&lt;/code&gt; expansion. | List of strings | optional | [] |
+| env | Environment variables of the action.&lt;br/&gt;&lt;br/&gt;Subject to &lt;code&gt;&lt;a href="https://docs.bazel.build/versions/main/be/make-variables.html#location"&gt;$(location)&lt;/a&gt;&lt;/code&gt; expansion. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
+| outs | Output files generated by the action.&lt;br/&gt;&lt;br/&gt;These labels are available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | List of labels | required | |
+| srcs | Additional inputs of the action.&lt;br/&gt;&lt;br/&gt;These labels are available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
+| tool | The tool to run in the action.&lt;br/&gt;&lt;br/&gt;Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for &lt;code&gt;$(location)&lt;/code&gt; expansion in &lt;code&gt;args&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt;. | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
diff --git a/docs/selects_doc.md b/docs/selects_doc.md
index 55711c9..6bc1bda 100755
--- a/docs/selects_doc.md
+++ b/docs/selects_doc.md
@@ -24,37 +24,13 @@ Example:
Key labels may appear at most once anywhere in the input.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.with_or-input_dict">
- <td><code>input_dict</code></td>
- <td>
- required.
- <p>
- The same dictionary `select()` takes, except keys may take
- either the usual form `"//foo:config1"` or
- `("//foo:config1", "//foo:config2", ...)` to signify
- `//foo:config1` OR `//foo:config2` OR `...`.
- </p>
- </td>
- </tr>
- <tr id="selects.with_or-no_match_error">
- <td><code>no_match_error</code></td>
- <td>
- optional. default is <code>""</code>
- <p>
- Optional custom error to report if no condition matches.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| input_dict | The same dictionary <code>select()</code> takes, except keys may take either the usual form <code>"//foo:config1"</code> or <code>("//foo:config1", "//foo:config2", ...)</code> to signify <code>//foo:config1</code> OR <code>//foo:config2</code> OR <code>...</code>. | none |
+| no_match_error | Optional custom error to report if no condition matches. | <code>""</code> |
<a name="#selects.with_or_dict"></a>
@@ -71,25 +47,12 @@ Unlike `select()`, the contents of the dict can be inspected by Starlark
macros.
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.with_or_dict-input_dict">
- <td><code>input_dict</code></td>
- <td>
- required.
- <p>
- Same as `with_or`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| input_dict | Same as <code>with_or</code>. | none |
<a name="#selects.config_setting_group"></a>
@@ -97,7 +60,7 @@ macros.
## selects.config_setting_group
<pre>
-selects.config_setting_group(<a href="#selects.config_setting_group-name">name</a>, <a href="#selects.config_setting_group-match_any">match_any</a>, <a href="#selects.config_setting_group-match_all">match_all</a>)
+selects.config_setting_group(<a href="#selects.config_setting_group-name">name</a>, <a href="#selects.config_setting_group-match_any">match_any</a>, <a href="#selects.config_setting_group-match_all">match_all</a>, <a href="#selects.config_setting_group-visibility">visibility</a>)
</pre>
Matches if all or any of its member `config_setting`s match.
@@ -124,45 +87,14 @@ Example:
```
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="selects.config_setting_group-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The group's name. This is how `select()`s reference it.
- </p>
- </td>
- </tr>
- <tr id="selects.config_setting_group-match_any">
- <td><code>match_any</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of `config_settings`. This group matches if *any* member
- in the list matches. If this is set, `match_all` must not be set.
- </p>
- </td>
- </tr>
- <tr id="selects.config_setting_group-match_all">
- <td><code>match_all</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of `config_settings`. This group matches if *every*
- member in the list matches. If this is set, `match_any` must be not
- set.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The group's name. This is how <code>select()</code>s reference it. | none |
+| match_any | A list of <code>config_settings</code>. This group matches if *any* member in the list matches. If this is set, <code>match_all</code> must not be set. | <code>[]</code> |
+| match_all | A list of <code>config_settings</code>. This group matches if *every* member in the list matches. If this is set, <code>match_any</code> must be not set. | <code>[]</code> |
+| visibility | Visibility of the config_setting_group. | <code>None</code> |
diff --git a/docs/shell_doc.md b/docs/shell_doc.md
index 6c655be..a414926 100755
--- a/docs/shell_doc.md
+++ b/docs/shell_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#shell.array_literal"></a>
+
## shell.array_literal
<pre>
@@ -14,28 +18,16 @@ Note that all elements in the array are quoted (using `shell.quote`) for
safety, even if they do not need to be.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="shell.array_literal-iterable">
- <td><code>iterable</code></td>
- <td>
- required.
- <p>
- A sequence of elements. Elements that are not strings will be
- converted to strings first, by calling `str()`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| iterable | A sequence of elements. Elements that are not strings will be converted to strings first, by calling <code>str()</code>. | none |
+<a name="#shell.quote"></a>
+
## shell.quote
<pre>
@@ -48,24 +40,11 @@ This function quotes the given string (in case it contains spaces or other
shell metacharacters.)
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="shell.quote-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- The string to quote.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| s | The string to quote. | none |
diff --git a/docs/structs_doc.md b/docs/structs_doc.md
index 3b742cb..c2f1337 100755
--- a/docs/structs_doc.md
+++ b/docs/structs_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#structs.to_dict"></a>
+
## structs.to_dict
<pre>
@@ -6,24 +10,11 @@ structs.to_dict(<a href="#structs.to_dict-s">s</a>)
Converts a `struct` to a `dict`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="structs.to_dict-s">
- <td><code>s</code></td>
- <td>
- required.
- <p>
- A `struct`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| s | A <code>struct</code>. | none |
diff --git a/docs/types_doc.md b/docs/types_doc.md
index 038ae0a..f18c561 100755
--- a/docs/types_doc.md
+++ b/docs/types_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#types.is_list"></a>
+
## types.is_list
<pre>
@@ -6,26 +10,15 @@ types.is_list(<a href="#types.is_list-v">v</a>)
Returns True if v is an instance of a list.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_list-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+
+<a name="#types.is_string"></a>
## types.is_string
@@ -35,27 +28,16 @@ types.is_string(<a href="#types.is_string-v">v</a>)
Returns True if v is an instance of a string.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_string-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+
+
+<a name="#types.is_bool"></a>
+
## types.is_bool
<pre>
@@ -64,27 +46,16 @@ types.is_bool(<a href="#types.is_bool-v">v</a>)
Returns True if v is an instance of a bool.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_bool-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+<a name="#types.is_none"></a>
+
## types.is_none
<pre>
@@ -93,27 +64,16 @@ types.is_none(<a href="#types.is_none-v">v</a>)
Returns True if v has the type of None.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_none-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+<a name="#types.is_int"></a>
+
## types.is_int
<pre>
@@ -122,26 +82,15 @@ types.is_int(<a href="#types.is_int-v">v</a>)
Returns True if v is an instance of a signed integer.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_int-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+
+
+<a name="#types.is_tuple"></a>
## types.is_tuple
@@ -151,27 +100,16 @@ types.is_tuple(<a href="#types.is_tuple-v">v</a>)
Returns True if v is an instance of a tuple.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_tuple-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+<a name="#types.is_dict"></a>
+
## types.is_dict
<pre>
@@ -180,27 +118,16 @@ types.is_dict(<a href="#types.is_dict-v">v</a>)
Returns True if v is an instance of a dict.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_dict-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+<a name="#types.is_function"></a>
+
## types.is_function
<pre>
@@ -209,26 +136,15 @@ types.is_function(<a href="#types.is_function-v">v</a>)
Returns True if v is an instance of a function.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_function-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+
+
+<a name="#types.is_depset"></a>
## types.is_depset
@@ -238,24 +154,29 @@ types.is_depset(<a href="#types.is_depset-v">v</a>)
Returns True if v is an instance of a `depset`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="types.is_depset-v">
- <td><code>v</code></td>
- <td>
- required.
- <p>
- The value whose type should be checked.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
+
+
+<a name="#types.is_set"></a>
+
+## types.is_set
+
+<pre>
+types.is_set(<a href="#types.is_set-v">v</a>)
+</pre>
+
+Returns True if v is a set created by sets.make().
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| v | The value whose type should be checked. | none |
diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md
index 4fbd96f..2b97abe 100755
--- a/docs/unittest_doc.md
+++ b/docs/unittest_doc.md
@@ -1,4 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
<a name="#unittest_toolchain"></a>
+
## unittest_toolchain
<pre>
@@ -7,55 +10,24 @@ unittest_toolchain(<a href="#unittest_toolchain-name">name</a>, <a href="#unitte
-### Attributes
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest_toolchain-name">
- <td><code>name</code></td>
- <td>
- <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
- <p>
- A unique name for this target.
- </p>
- </td>
- </tr>
- <tr id="unittest_toolchain-failure_templ">
- <td><code>failure_templ</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-file_ext">
- <td><code>file_ext</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-join_on">
- <td><code>join_on</code></td>
- <td>
- String; required
- </td>
- </tr>
- <tr id="unittest_toolchain-success_templ">
- <td><code>success_templ</code></td>
- <td>
- String; required
- </td>
- </tr>
- </tbody>
-</table>
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :-------------: | :-------------: | :-------------: | :-------------: | :-------------: |
+| name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
+| failure_templ | - | String | required | |
+| file_ext | - | String | required | |
+| join_on | - | String | required | |
+| success_templ | - | String | required | |
+
+<a name="#analysistest.make"></a>
## analysistest.make
<pre>
-analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-attrs">attrs</a>, <a href="#analysistest.make-config_settings">config_settings</a>)
+analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-attrs">attrs</a>, <a href="#analysistest.make-fragments">fragments</a>, <a href="#analysistest.make-config_settings">config_settings</a>)
</pre>
Creates an analysis test rule from its implementation function.
@@ -84,59 +56,20 @@ your_test = analysistest.make(_your_test)
Recall that names of test rules must end in `_test`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.make-impl">
- <td><code>impl</code></td>
- <td>
- required.
- <p>
- The implementation function of the unit test.
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-expect_failure">
- <td><code>expect_failure</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- If true, the analysis test will expect the target_under_test
- to fail. Assertions can be made on the underlying failure using asserts.expect_failure
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-attrs">
- <td><code>attrs</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- An optional dictionary to supplement the attrs passed to the
- unit test's `rule()` constructor.
- </p>
- </td>
- </tr>
- <tr id="analysistest.make-config_settings">
- <td><code>config_settings</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- A dictionary of configuration settings to change for the target under
- test and its dependencies. This may be used to essentially change 'build flags' for
- the target under test, and may thus be utilized to test multiple targets with different
- flags in a single build
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| impl | The implementation function of the unit test. | none |
+| expect_failure | If true, the analysis test will expect the target_under_test to fail. Assertions can be made on the underlying failure using asserts.expect_failure | <code>False</code> |
+| attrs | An optional dictionary to supplement the attrs passed to the unit test's <code>rule()</code> constructor. | <code>{}</code> |
+| fragments | An optional list of fragment names that can be used to give rules access to language-specific parts of configuration. | <code>[]</code> |
+| config_settings | A dictionary of configuration settings to change for the target under test and its dependencies. This may be used to essentially change 'build flags' for the target under test, and may thus be utilized to test multiple targets with different flags in a single build | <code>{}</code> |
+
+
+<a name="#analysistest.begin"></a>
+
## analysistest.begin
<pre>
@@ -151,27 +84,15 @@ assertion failures so that they can be reported and logged at the end of the
test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.begin-ctx">
- <td><code>ctx</code></td>
- <td>
- required.
- <p>
- The Skylark context. Pass the implementation function's `ctx` argument
- in verbatim.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| ctx | The Starlark context. Pass the implementation function's <code>ctx</code> argument in verbatim. | none |
+
+
+<a name="#analysistest.end"></a>
## analysistest.end
@@ -185,26 +106,15 @@ This must be called and returned at the end of an analysis test implementation f
that the results are reported.
-### Parameters
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>analysistest.begin</code>. | none |
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.end-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+<a name="#analysistest.fail"></a>
## analysistest.fail
@@ -214,36 +124,17 @@ analysistest.fail(<a href="#analysistest.fail-env">env</a>, <a href="#analysiste
Unconditionally causes the current test to fail.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.fail-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="analysistest.fail-msg">
- <td><code>msg</code></td>
- <td>
- required.
- <p>
- The message to log describing the failure.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| msg | The message to log describing the failure. | none |
+
+
+<a name="#analysistest.target_actions"></a>
+
## analysistest.target_actions
<pre>
@@ -252,26 +143,33 @@ analysistest.target_actions(<a href="#analysistest.target_actions-env">env</a>)
Returns a list of actions registered by the target under test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.target_actions-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+
+<a name="#analysistest.target_bin_dir_path"></a>
+
+## analysistest.target_bin_dir_path
+
+<pre>
+analysistest.target_bin_dir_path(<a href="#analysistest.target_bin_dir_path-env">env</a>)
+</pre>
+
+Returns ctx.bin_dir.path for the target under test.
+
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+
+<a name="#analysistest.target_under_test"></a>
## analysistest.target_under_test
@@ -281,27 +179,16 @@ analysistest.target_under_test(<a href="#analysistest.target_under_test-env">env
Returns the target under test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="analysistest.target_under_test-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>analysistest.begin</code>. | none |
+
+
+<a name="#asserts.expect_failure"></a>
+
## asserts.expect_failure
<pre>
@@ -314,35 +201,16 @@ This requires that the analysis test is created with `analysistest.make()` and
`expect_failures = True` is specified.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.expect_failure-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `analysistest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.expect_failure-expected_failure_msg">
- <td><code>expected_failure_msg</code></td>
- <td>
- optional. default is <code>""</code>
- <p>
- The error message to expect as a result of analysis failures.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>analysistest.begin</code>. | none |
+| expected_failure_msg | The error message to expect as a result of analysis failures. | <code>""</code> |
+
+
+<a name="#asserts.equals"></a>
## asserts.equals
@@ -352,55 +220,19 @@ asserts.equals(<a href="#asserts.equals-env">env</a>, <a href="#asserts.equals-e
Asserts that the given `expected` and `actual` values are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected value of some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual value returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| expected | The expected value of some computation. | none |
+| actual | The actual value returned by some computation. | none |
+| msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+<a name="#asserts.false"></a>
+
## asserts.false
<pre>
@@ -409,45 +241,17 @@ asserts.false(<a href="#asserts.false-env">env</a>, <a href="#asserts.false-cond
Asserts that the given `condition` is false.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.false-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.false-condition">
- <td><code>condition</code></td>
- <td>
- required.
- <p>
- A value that will be evaluated in a Boolean context.
- </p>
- </td>
- </tr>
- <tr id="asserts.false-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>"Expected condition to be false, but was true."</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| condition | A value that will be evaluated in a Boolean context. | none |
+| msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>"Expected condition to be false, but was true."</code> |
+
+<a name="#asserts.set_equals"></a>
## asserts.set_equals
@@ -457,55 +261,19 @@ asserts.set_equals(<a href="#asserts.set_equals-env">env</a>, <a href="#asserts.
Asserts that the given `expected` and `actual` sets are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.set_equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected set resulting from some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual set returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.set_equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| expected | The expected set resulting from some computation. | none |
+| actual | The actual set returned by some computation. | none |
+| msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+
+
+<a name="#asserts.new_set_equals"></a>
+
## asserts.new_set_equals
<pre>
@@ -514,54 +282,18 @@ asserts.new_set_equals(<a href="#asserts.new_set_equals-env">env</a>, <a href="#
Asserts that the given `expected` and `actual` sets are equal.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.new_set_equals-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-expected">
- <td><code>expected</code></td>
- <td>
- required.
- <p>
- The expected set resulting from some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-actual">
- <td><code>actual</code></td>
- <td>
- required.
- <p>
- The actual set returned by some computation.
- </p>
- </td>
- </tr>
- <tr id="asserts.new_set_equals-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| expected | The expected set resulting from some computation. | none |
+| actual | The actual set returned by some computation. | none |
+| msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>None</code> |
+
+
+<a name="#asserts.true"></a>
## asserts.true
@@ -571,46 +303,18 @@ asserts.true(<a href="#asserts.true-env">env</a>, <a href="#asserts.true-conditi
Asserts that the given `condition` is true.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="asserts.true-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="asserts.true-condition">
- <td><code>condition</code></td>
- <td>
- required.
- <p>
- A value that will be evaluated in a Boolean context.
- </p>
- </td>
- </tr>
- <tr id="asserts.true-msg">
- <td><code>msg</code></td>
- <td>
- optional. default is <code>"Expected condition to be true, but was false."</code>
- <p>
- An optional message that will be printed that describes the failure.
- If omitted, a default will be used.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| condition | A value that will be evaluated in a Boolean context. | none |
+| msg | An optional message that will be printed that describes the failure. If omitted, a default will be used. | <code>"Expected condition to be true, but was false."</code> |
+<a name="#register_unittest_toolchains"></a>
+
## register_unittest_toolchains
<pre>
@@ -619,8 +323,12 @@ register_unittest_toolchains()
Registers the toolchains for unittest users.
+**PARAMETERS**
+
+<a name="#unittest.make"></a>
+
## unittest.make
<pre>
@@ -653,36 +361,16 @@ your_test = unittest.make(_your_test)
Recall that names of test rules must end in `_test`.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.make-impl">
- <td><code>impl</code></td>
- <td>
- required.
- <p>
- The implementation function of the unit test.
- </p>
- </td>
- </tr>
- <tr id="unittest.make-attrs">
- <td><code>attrs</code></td>
- <td>
- optional. default is <code>{}</code>
- <p>
- An optional dictionary to supplement the attrs passed to the
- unit test's `rule()` constructor.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| impl | The implementation function of the unit test. | none |
+| attrs | An optional dictionary to supplement the attrs passed to the unit test's <code>rule()</code> constructor. | <code>{}</code> |
+
+
+<a name="#unittest.suite"></a>
## unittest.suite
@@ -699,10 +387,10 @@ and then creating each target one by one. To reduce duplication, we recommend
writing a macro in your `.bzl` file to instantiate all targets, and calling
that macro from your BUILD file so you only have to load one symbol.
-For the case where your unit tests do not take any (non-default) attributes --
-i.e., if your unit tests do not test rules -- you can use this function to
-create the targets and wrap them in a single test_suite target. In your
-`.bzl` file, write:
+You can use this function to create the targets and wrap them in a single
+test_suite target. If a test rule requires no arguments, you can simply list
+it as an argument. If you wish to supply attributes explicitly, you can do so
+using `partial.make()`. For instance, in your `.bzl` file, you could write:
```
def your_test_suite():
@@ -710,7 +398,7 @@ def your_test_suite():
"your_test_suite",
your_test,
your_other_test,
- yet_another_test,
+ partial.make(yet_another_test, timeout = "short"),
)
```
@@ -729,37 +417,17 @@ is the index of the test in the `test_rules` list, which is used to uniquely
name each target.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.suite-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- The name of the `test_suite` target, and the prefix of all the test
- target names.
- </p>
- </td>
- </tr>
- <tr id="unittest.suite-test_rules">
- <td><code>test_rules</code></td>
- <td>
- optional.
- <p>
- A list of test rules defines by `unittest.test`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | The name of the <code>test_suite</code> target, and the prefix of all the test target names. | none |
+| test_rules | A list of test rules defines by <code>unittest.test</code>. | none |
+<a name="#unittest.begin"></a>
+
## unittest.begin
<pre>
@@ -774,27 +442,15 @@ assertion failures so that they can be reported and logged at the end of the
test.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.begin-ctx">
- <td><code>ctx</code></td>
- <td>
- required.
- <p>
- The Skylark context. Pass the implementation function's `ctx` argument
- in verbatim.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| ctx | The Starlark context. Pass the implementation function's <code>ctx</code> argument in verbatim. | none |
+
+<a name="#unittest.end"></a>
## unittest.end
@@ -808,26 +464,15 @@ This must be called and returned at the end of a unit test implementation functi
that the results are reported.
-### Parameters
+**PARAMETERS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.end-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+
+
+<a name="#unittest.fail"></a>
## unittest.fail
@@ -837,33 +482,12 @@ unittest.fail(<a href="#unittest.fail-env">env</a>, <a href="#unittest.fail-msg"
Unconditionally causes the current test to fail.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="unittest.fail-env">
- <td><code>env</code></td>
- <td>
- required.
- <p>
- The test environment returned by `unittest.begin`.
- </p>
- </td>
- </tr>
- <tr id="unittest.fail-msg">
- <td><code>msg</code></td>
- <td>
- required.
- <p>
- The message to log describing the failure.
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| env | The test environment returned by <code>unittest.begin</code>. | none |
+| msg | The message to log describing the failure. | none |
diff --git a/docs/versions_doc.md b/docs/versions_doc.md
index d94076c..b39f5d0 100755
--- a/docs/versions_doc.md
+++ b/docs/versions_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#versions.get"></a>
+
## versions.get
<pre>
@@ -6,7 +10,11 @@ versions.get()
Returns the current Bazel version
+**PARAMETERS**
+
+
+<a name="#versions.parse"></a>
## versions.parse
@@ -19,26 +27,15 @@ Parses a version string into a 3-tuple of ints
int tuples can be compared directly using binary operators (<, >).
-### Parameters
+**PARAMETERS**
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.parse-bazel_version">
- <td><code>bazel_version</code></td>
- <td>
- required.
- <p>
- the Bazel version string
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| bazel_version | the Bazel version string | none |
+
+
+<a name="#versions.check"></a>
## versions.check
@@ -48,44 +45,17 @@ versions.check(<a href="#versions.check-minimum_bazel_version">minimum_bazel_ver
Check that the version of Bazel is valid within the specified range.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.check-minimum_bazel_version">
- <td><code>minimum_bazel_version</code></td>
- <td>
- required.
- <p>
- minimum version of Bazel expected
- </p>
- </td>
- </tr>
- <tr id="versions.check-maximum_bazel_version">
- <td><code>maximum_bazel_version</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- maximum version of Bazel expected
- </p>
- </td>
- </tr>
- <tr id="versions.check-bazel_version">
- <td><code>bazel_version</code></td>
- <td>
- optional. default is <code>None</code>
- <p>
- the version of Bazel to check. Used for testing, defaults to native.bazel_version
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| minimum_bazel_version | minimum version of Bazel expected | none |
+| maximum_bazel_version | maximum version of Bazel expected | <code>None</code> |
+| bazel_version | the version of Bazel to check. Used for testing, defaults to native.bazel_version | <code>None</code> |
+
+
+<a name="#versions.is_at_most"></a>
## versions.is_at_most
@@ -95,36 +65,17 @@ versions.is_at_most(<a href="#versions.is_at_most-threshold">threshold</a>, <a h
Check that a version is lower or equals to a threshold.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.is_at_most-threshold">
- <td><code>threshold</code></td>
- <td>
- required.
- <p>
- the maximum version string
- </p>
- </td>
- </tr>
- <tr id="versions.is_at_most-version">
- <td><code>version</code></td>
- <td>
- required.
- <p>
- the version string to be compared to the threshold
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| threshold | the maximum version string | none |
+| version | the version string to be compared to the threshold | none |
+<a name="#versions.is_at_least"></a>
+
## versions.is_at_least
<pre>
@@ -133,33 +84,12 @@ versions.is_at_least(<a href="#versions.is_at_least-threshold">threshold</a>, <a
Check that a version is higher or equals to a threshold.
-### Parameters
-
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="versions.is_at_least-threshold">
- <td><code>threshold</code></td>
- <td>
- required.
- <p>
- the minimum version string
- </p>
- </td>
- </tr>
- <tr id="versions.is_at_least-version">
- <td><code>version</code></td>
- <td>
- required.
- <p>
- the version string to be compared to the threshold
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+**PARAMETERS**
+
+
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| threshold | the minimum version string | none |
+| version | the version string to be compared to the threshold | none |
diff --git a/docs/write_file_doc.md b/docs/write_file_doc.md
index d8f098e..74f6327 100755
--- a/docs/write_file_doc.md
+++ b/docs/write_file_doc.md
@@ -1,3 +1,7 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+<a name="#write_file"></a>
+
## write_file
<pre>
@@ -6,74 +10,16 @@ write_file(<a href="#write_file-name">name</a>, <a href="#write_file-out">out</a
Creates a UTF-8 encoded text file.
-### Parameters
+**PARAMETERS**
+
-<table class="params-table">
- <colgroup>
- <col class="col-param" />
- <col class="col-description" />
- </colgroup>
- <tbody>
- <tr id="write_file-name">
- <td><code>name</code></td>
- <td>
- required.
- <p>
- Name of the rule.
- </p>
- </td>
- </tr>
- <tr id="write_file-out">
- <td><code>out</code></td>
- <td>
- required.
- <p>
- Path of the output file, relative to this package.
- </p>
- </td>
- </tr>
- <tr id="write_file-content">
- <td><code>content</code></td>
- <td>
- optional. default is <code>[]</code>
- <p>
- A list of strings. Lines of text, the contents of the file.
- Newlines are added automatically after every line except the last one.
- </p>
- </td>
- </tr>
- <tr id="write_file-is_executable">
- <td><code>is_executable</code></td>
- <td>
- optional. default is <code>False</code>
- <p>
- A boolean. Whether to make the output file executable.
- When True, the rule's output can be executed using `bazel run` and can
- be in the srcs of binary and test rules that require executable
- sources.
- </p>
- </td>
- </tr>
- <tr id="write_file-newline">
- <td><code>newline</code></td>
- <td>
- optional. default is <code>"auto"</code>
- <p>
- one of ["auto", "unix", "windows"]: line endings to use. "auto"
- for platform-determined, "unix" for LF, and "windows" for CRLF.
- </p>
- </td>
- </tr>
- <tr id="write_file-kwargs">
- <td><code>kwargs</code></td>
- <td>
- optional.
- <p>
- further keyword arguments, e.g. <code>visibility</code>
- </p>
- </td>
- </tr>
- </tbody>
-</table>
+| Name | Description | Default Value |
+| :-------------: | :-------------: | :-------------: |
+| name | Name of the rule. | none |
+| out | Path of the output file, relative to this package. | none |
+| content | A list of strings. Lines of text, the contents of the file. Newlines are added automatically after every line except the last one. | <code>[]</code> |
+| is_executable | A boolean. Whether to make the output file executable. When True, the rule's output can be executed using <code>bazel run</code> and can be in the srcs of binary and test rules that require executable sources. | <code>False</code> |
+| newline | one of ["auto", "unix", "windows"]: line endings to use. "auto" for platform-determined, "unix" for LF, and "windows" for CRLF. | <code>"auto"</code> |
+| kwargs | further keyword arguments, e.g. &lt;code&gt;visibility&lt;/code&gt; | none |