Skip to content

Commit a440401

Browse files
rdrawardgitbook-bot
authored andcommitted
GITBOOK-698: No subject
1 parent d0a4da2 commit a440401

17 files changed

+46
-53
lines changed

administration/integration-for-slack.md

-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ To receive notifications and/or interact with Trunk from Slack, an admin needs t
1616

1717
<figure><img src="https://files.readme.io/14d4355-image.png" alt=""><figcaption></figcaption></figure>
1818
2. This will open a window where you can sign in to your Slack workspace.
19-
20-
<div data-full-width="false">
21-
22-
<figure><img src="../.gitbook/assets/testtrunkintegration.slack.com_oauth_client_id=1523871431059.3961451315218&#x26;scope=incoming-webhook,channels:join,channels:manage&#x26;user_scope=&#x26;redirect_uri=https:/app.trunk.io/slack/07e100e0-5053-42ed-8d13-cd953bba3b42" alt="Dialog to connect Trunk to your Slack workspace" width="563"><figcaption></figcaption></figure>
23-
24-
</div>
25-
2619
3. Once you press **Allow**, Trunk will connect to your Slack automatically and begin pushing updates to the channel you have selected.
2720

2821
## Set repo-level notification preferences

ci-analytics/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ description: See live and trend data about the performance and flakiness of your
66

77
## Overview
88

9-
Trunk CI Analytics unifies information about CI performance, trends, and reliability. CI Analytics provides powerful dashboards that allow you to understand your CI systems' health quickly. CI Analytics gives developers the tools they need to investigate, triage, and fix performance and reliability problems that slow down your engineering teams.
9+
Trunk CI Analytics unifies information about CI performance, trends, and reliability. CI Analytics provides powerful dashboards that allow you to understand your CI systems' health quickly. CI Analytics gives developers the tools they need to investigate, triage, and fix performance and reliability problems that slow down engineering teams.
1010

1111
{% embed url="https://share.vidyard.com/watch/wwnfuxL7ETg36DJrF2RBEZ" %}
1212

1313
## Integrations
1414

1515
Trunk CI Analytics integrates with the following CI providers to gather pipeline metrics that track the performance and results of your CI systems.
1616

17-
<table data-column-title-hidden data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>GitHub Actions</td><td></td><td></td><td><a href="../.gitbook/assets/Group 1274.png">Group 1274.png</a></td><td><a href="setup/github-actions.md">github-actions.md</a></td></tr><tr><td><strong>Jenkins</strong></td><td></td><td></td><td><a href="../.gitbook/assets/Group 1273.png">Group 1273.png</a></td><td><a href="setup/jenkins.md">jenkins.md</a></td></tr><tr><td>Buildkite</td><td></td><td></td><td><a href="../.gitbook/assets/Group 1276.png">Group 1276.png</a></td><td><a href="setup/api.md">api.md</a></td></tr><tr><td>CircleCI</td><td></td><td></td><td><a href="../.gitbook/assets/Group 1275.png">Group 1275.png</a></td><td><a href="setup/api.md">api.md</a></td></tr><tr><td>API</td><td></td><td></td><td><a href="../.gitbook/assets/Group 1277.png">Group 1277.png</a></td><td><a href="setup/api.md">api.md</a></td></tr></tbody></table>
17+
<table data-column-title-hidden data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>GitHub Actions</td><td></td><td></td><td><a href="../.gitbook/assets/github.png">github.png</a></td><td><a href="setup/github-actions.md">github-actions.md</a></td></tr><tr><td><strong>Jenkins</strong></td><td></td><td></td><td><a href="../.gitbook/assets/jenkins.png">jenkins.png</a></td><td><a href="setup/jenkins.md">jenkins.md</a></td></tr><tr><td>Buildkite</td><td></td><td></td><td><a href="../.gitbook/assets/bazel.png">bazel.png</a></td><td><a href="setup/api.md">api.md</a></td></tr><tr><td>CircleCI</td><td></td><td></td><td><a href="../.gitbook/assets/circle-ci.png">circle-ci.png</a></td><td><a href="setup/api.md">api.md</a></td></tr><tr><td>API</td><td></td><td></td><td><a href="../.gitbook/assets/Group 1277.png">Group 1277.png</a></td><td><a href="setup/api.md">api.md</a></td></tr></tbody></table>
1818

1919
Don't see your CI Provider listed here? Please contact our community slack at [slack.trunk.io](https://slack.trunk.io) or support at [[email protected]](mailto:[email protected]), and we'll add it.
2020

cli/commands-reference/actions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ trunk show-announcements post-merge --verbose
190190
trunk show-announcements pre-rebase [options] [branch-refs...]
191191
```
192192

193-
### **Trunk show announcements post checkout**
193+
### **Trunk show announcements post-checkout**
194194

195195
**`trunk show-announcements post-checkout`**: Run on git checkout/switch, usually run by a git-hook and not directly.
196196

cli/commands-reference/code-quality.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### trunk check
44

5-
`trunk check`: Universal code checker.&#x20;
5+
`trunk check`: Universal code checker.
66

77
#### **Usage** **example**
88

@@ -14,7 +14,7 @@ trunk check [options]
1414

1515
* `-a, --all`: Check all files instead of only changed files
1616
* `--sample`: Run each linter on N files
17-
* `--filter`: Comma separated list of linters and/or issue codes to include or exclude
17+
* `--filter`: Comma-separated list of linters and/or issue codes to include or exclude
1818
* `--exclude`: Shorthand for an inverse --filter
1919
* `--scope`: Scope of checks to run {all | security}
2020
* `--ignore`: Glob pattern to exclude files from linting
@@ -50,11 +50,11 @@ trunk check [options]
5050
* `-n, --no-fix`: Don't automatically apply fixes
5151
* `--cache`: Disable to skip cache for all check actions
5252
* `--ignore-git-state`: Run linters even if a merge, rebase, or revert is in progress
53-
* `--upstream`: Upstream branch used to compute changed files&#x20;
53+
* `--upstream`: Upstream branch used to compute changed files
5454

5555
### Trunk Check Enable Linter
5656

57-
`trunk check enable`: Enable linters for trunk check.&#x20;
57+
`trunk check enable`: Enable linters for trunk check.
5858

5959
#### **Usage** **example**
6060

@@ -64,7 +64,7 @@ trunk check enable [options]
6464

6565
### Trunk Check Disable Linter
6666

67-
`trunk check disable`: Disable linters for trunk check.&#x20;
67+
`trunk check disable`: Disable linters for trunk check.
6868

6969
#### **Usage** **example**
7070

@@ -74,7 +74,7 @@ trunk check disable [options]
7474

7575
### Trunk Check List Linters
7676

77-
`trunk check list`: List linters for trunk check.&#x20;
77+
`trunk check list`: List linters for trunk check.
7878

7979
#### **Usage** **example**
8080

@@ -84,7 +84,7 @@ trunk check list [options]
8484

8585
### Trunk Check Run Format
8686

87-
`trunk fmt`: List linters for trunk check.&#x20;
87+
`trunk fmt`: List linters for trunk check.
8888

8989
#### **Usage** **example**
9090

@@ -97,7 +97,7 @@ trunk fmt [options]
9797
#### Filtering Options
9898

9999
* `-a, --all`: Check all files instead of only changed files
100-
* `--filter`: Comma separated list of linters and/or issue codes to include or exclude
100+
* `--filter`: Comma-separated list of linters and/or issue codes to include or exclude
101101
* `--exclude`: Shorthand for an inverse --filter
102102
* `--scope`: Scope of checks to run {all | security}
103103
* `--ignore`: Glob pattern to exclude files from linting
@@ -126,7 +126,7 @@ trunk fmt [options]
126126
* `-n, --no-fix`: Don't automatically apply fixes
127127
* `--cache`: Disable to skip cache for all check actions
128128
* `--ignore-git-state`: Run linters even if a merge, rebase, or revert is in progress
129-
* `--upstream`: Upstream branch used to compute changed files&#x20;
129+
* `--upstream`: Upstream branch used to compute changed files
130130
* `-j`, `--jobs`: Number of concurrent jobs
131131

132132
## Advanced Trunk Check Features

cli/compatibility.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Trunk only supports Windows with the following versions and above:
1414

1515
<table><thead><tr><th width="112.33333333333331">Tool</th><th width="397">Where to Modify</th><th>Minimum Required Version</th></tr></thead><tbody><tr><td>CLI</td><td><code>cli</code> <code>version</code> in <code>.trunk/trunk.yaml</code></td><td><code>1.13.0</code></td></tr><tr><td>Plugins</td><td><code>ref</code> for the <code>trunk</code> plugin in <code>.trunk/trunk.yaml</code></td><td><code>v1.0.0</code></td></tr><tr><td>VSCode</td><td>Reload VSCode to update</td><td><code>3.4.4</code></td></tr></tbody></table>
1616

17-
You will also need to install [C and C++ runtime libraries](https://aka.ms/vs/17/release/vc\_redist.x64.exe) in order to run some linters.
17+
You will also need to install [C and C++ runtime libraries](https://aka.ms/vs/17/release/vc_redist.x64.exe) to run some linters.
1818

1919
#### Getting in touch
2020

cli/configuration/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
The Trunk CLI has its top-level config defined in `.trunk/trunk.yaml`.&#x20;
3+
The Trunk CLI has its top-level config defined in `.trunk/trunk.yaml`.
44

55
```
66
/your_repo
@@ -15,7 +15,7 @@ This is initially generated by `trunk init` and is the central source of truth f
1515

1616
### Config Format
1717

18-
The Trunk configuration file is written in YAML and is meant to be self-descriptive.Below is a sample config file to help you understand how the pieces come together. Alternatively, you can also refer to [the `trunk.yaml` in our GitHub Action](https://github.com/trunk-io/trunk-action/blob/main/.trunk/trunk.yaml) as an example or [`trunk-yaml-schema.json`](https://static.trunk.io/pub/trunk-yaml-schema.json).
18+
The Trunk configuration file is written in YAML and is meant to be self-descriptive. Below is a sample config file to help you understand how the pieces come together. Alternatively, you can also refer to [the `trunk.yaml` in our GitHub Action](https://github.com/trunk-io/trunk-action/blob/main/.trunk/trunk.yaml) as an example or [`trunk-yaml-schema.json`](https://static.trunk.io/pub/trunk-yaml-schema.json).
1919

2020
```yaml
2121
version: 0.1 # the version of this config file.

cli/configuration/actions/logging-and-troubleshooting.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Every action execution is logged. We consider an action execution to have failed
1212

1313
Failed action executions will also produce a notification so that background failures are periodically surfaced to the user.
1414

15-
You can inspect also inspect action logs at `.trunk/out/actions/<action_id>/`.
15+
You can also inspect action logs at `.trunk/out/actions/<action_id>/`.
1616

17-
We recommend running actions manually when you develop them in order to verify that they work correctly.
17+
We recommend running actions manually when you develop them to verify that they work correctly.
1818

1919
### Output Level
2020

21-
In order to see a more verbose output when running trunk actions, particularly from git-hooks, you can add the following to your `trunk.yaml`:
21+
To see a more verbose output when running trunk actions, particularly from git-hooks, you can add the following to your `trunk.yaml`:
2222

2323
```yaml
2424
actions:

cli/configuration/actions/notifications.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >-
88

99
### Defining actions that produce notifications
1010

11-
Typically, whatever actions write to stdout is stored in the log file and perhaps shown to the user. However, actions can also produce structured output if `output_type` is set on the Action Definition to be `notification_v1`.
11+
Typically, whatever actions write to stdout are stored in the log file and perhaps shown to the user. However, actions can also produce structured output if `output_type` is set on the Action Definition to be `notification_v1`.
1212

1313
In this case, the action should print yaml to output with the following structure:
1414

@@ -29,10 +29,10 @@ notifications:
2929
3030
Some notes:
3131
32-
1. The ID can be whatever you want it to, but generally should be made to match the action ID.
32+
1. The ID can be whatever you want it to be, but generally should be made to match the action ID.
3333
2. You may emit multiple notifications per action.
3434
3. `icon` and `commands` are used to control notifications display in VSCode.
35-
4. High priority notifications are immediately shown to the user in terminal. Low priority notifications are only shown every 24 hours (These are configurable).
35+
4. High-priority notifications are immediately shown to the user in terminal. Low-priority notifications are only shown every 24 hours (These are configurable).
3636

3737
### Deleting notifications
3838

cli/configuration/lint/definitions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ The definition of a particular linter is put under `lint.definitions`. The follo
2424

2525
## `direct_configs`
2626

27-
`direct_configs`: _string list_. Indicates config files used to auto enable the linter. See [Auto Enabling](auto-enable.md).
27+
`direct_configs`: _string list_. Indicates config files used to auto-enable the linter. See [Auto Enabling](auto-enable.md).
2828

2929
## `disabled`
3030

3131
`disabled`: _optional boolean_: Whether linter is actively disabled (and will not be recommended) and will not run (overrides enabled).
3232

3333
## `download`
3434

35-
`download`: _string_. The download url. You must provide either runtime + packages or download, not both. Using runtimes is preferred. See [Runtimes](../runtimes.md).
35+
`download`: _string_. The download URL. You must provide either runtime + packages or download, not both. Using runtimes is preferred. See [Runtimes](../runtimes.md).
3636

3737
## `enabled`
3838

@@ -44,15 +44,15 @@ The definition of a particular linter is put under `lint.definitions`. The follo
4444

4545
## `extra_packages`
4646

47-
`extra_packages`: list of strings, Extra packages to install, versions are optional See [Linter Dependencies](dependencies.md).
47+
`extra_packages`: list of strings, Extra packages to install, versions are optional. See [Linter Dependencies](dependencies.md).
4848

4949
## `formatter`
5050

5151
`formatter`: _boolean_. Indicates whether this is a formatter and should be included in `trunk fmt`.
5252

5353
## `good_without_config`
5454

55-
`good_without_config`: _optional boolean_. Indicates whether this linter is recommended without the user tuning its configuration. Prefer [`suggest_if`](definitions.md#suggest\_if).
55+
`good_without_config`: _optional boolean_. Indicates whether this linter is recommended without the user tuning its configuration. Prefer [`suggest_if`](definitions.md#suggest_if).
5656

5757
## `hold_the_line`
5858

cli/configuration/lint/output-parsing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ The execution model that `trunk` follows for a parser is that it will:
3333
* assert that the exit code of the parser is 0, and then
3434
* use `output` to determine how it should parse the parser's `stdout`.
3535

36-
Note that you can also set `parser.runtime` to [`node`](output-parsing.md#node) or [`python`](output-parsing.md#python) so that you can write your parser in Javascript or Python instead, if you so prefer! You can find plenty examples of python parsers in our [plugins repo](https://github.com/trunk-io/plugins).
36+
Note that you can also set `parser.runtime` to [`node`](output-parsing.md#node) or [`python`](output-parsing.md#python) so that you can write your parser in Javascript or Python instead, if you so prefer! You can find plenty of examples of python parsers in our [plugins repo](https://github.com/trunk-io/plugins).
3737

3838
{% tabs %}
3939
{% tab title="node" %}
40-
#### Node
40+
**Node**
4141

4242
```yaml
4343
lint:
@@ -77,7 +77,7 @@ Remember to run `chmod u+x todo-finder-parser.js` so that `trunk` can run it!
7777
{% endtab %}
7878

7979
{% tab title="python" %}
80-
#### Python
80+
**Python**
8181

8282
```yaml
8383
lint:

cli/configuration/lint/output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The output format that Trunk expects from a linter is determined by its [`output
1616

1717
## Output Types
1818

19-
Trunk supports several different generic output types. Most linters will use one of these output types, but if your linter doesn't conform well to any of these specifications, you can also write a [custom parser](output-parsing.md). In general SARIF should be preferred over other formats because it is the most flexible and battle tested.
19+
Trunk supports several different generic output types. Most linters will use one of these output types, but if your linter doesn't conform well to any of these specifications, you can also write a [custom parser](output-parsing.md). In general, SARIF should be preferred over other formats because it is the most flexible and battle tested.
2020

2121
Trunk currently supports the following linter output types.
2222

cli/configuration/plugins/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
Trunk uses a plugin system where a root configuration is defined in the [trunk-io/plugin repository](https://github.com/trunk-io/plugins). You can import many plugin config sources, and fields defined at each level override the level above.
66

77
{% hint style="info" %}
8-
When plugins configs are merged, only fields defined in a config file are merged into the level above. You can define just the fields you wish to override in `.trunk/trunk.yaml and .trunk/user.yaml.`
8+
When plugin configs are merged, only fields defined in a config file are merged into the level above. You can define just the fields you wish to override in `.trunk/trunk.yaml and .trunk/user.yaml.`
99
{% endhint %}
1010

1111
When using trunk, you can merge several sets of configuration files with a `trunk.yaml` schema. Config merging proceeds as follows:
1212

1313
1. Remote plugins sourced in `.trunk/trunk.yaml` (and `.trunk/user.yaml`). Plugins are sourced in the order they're defined, with later plugins overriding those defined before it. The [`trunk`](https://github.com/trunk-io/plugins) plugin is implicitly sourced first.
14-
2. Your repo level `.trunk/trunk.yaml` file, complete with a CLI version and any definitions or enables. Configurations defined here overrides what's defined in the remote plugins.
14+
2. Your repo level `.trunk/trunk.yaml` file, complete with a CLI version and any definitions or enables. Configurations defined here override what's defined in the remote plugins.
1515
3. Optionally, `.trunk/user.yaml`, a local **git-ignored** file where users can provide their own overrides.
1616

1717
Additionally, any files enumerated in the lint `exported_configs` section are symlinked from their relevant plugin into the root of the workspace when an applicable linter is run with `trunk check`.
1818

1919
### Importing a Plugin Repository
2020

21-
By default trunk imports the trunk-io/plugins repository. To import a repo add it to the `plugins.sources` list. Each repo requires a URI and ref.
21+
By default, trunk imports the trunk-io/plugins repository. To import a repo add it to the `plugins.sources` list. Each repo requires a URI and ref.
2222

2323
```yaml
2424
plugins:

cli/configuration/plugins/exported-configs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Reusing linter configs across projects.
44

55
# Exporting Linter Configs
66

7-
Plugin repositories can also export their own linter config files in order to keep configuration synced across an organization. Simply add an `exported_configs` section to a `plugin.yaml`, with paths to all of the config files you want to export, relative to the repository root. For example:
7+
Plugin repositories can also export their own linter config files to keep configuration synced across an organization. Simply add an `exported_configs` section to a `plugin.yaml`, with paths to all of the config files you want to export, relative to the repository root. For example:
88

99
```yaml
1010
lint:
@@ -17,15 +17,15 @@ lint:
1717
These config files will be available for linters that enumerate them in `affects_cache`or `direct_configs` to reference. These files are automatically symlinked into the repository root during linter execution. The set of applicable config files can be viewed in the details yaml file listed when running `trunk check --verbose`.
1818

1919
Plugin-exported configs are sourced in lockstep with the plugin itself, so you will need to update\
20-
the `ref` field in order to use the latest configs.
20+
the `ref` field to use the latest configs.
2121

2222
Note that if you're using an IDE Extension like clangd with an LSP that relies on those configs being in the root, you will need to manually create a symlink to the plugin's config. You can do this by running `ln -s .trunk/plugins/<plugin-id>/<path-to-config> <name-of-config>`.
2323

2424
For an example of a plugin repo with config files, see our own [configs](https://github.com/trunk-io/configs) repo.
2525

2626
### Importing Configs
2727

28-
This process can also be reversed in order to import config files from a plugins repository which\
28+
This process can also be reversed to import config files from a plugins repository which\
2929
does not explicitly export them. Given a plugin sourced with id `trunk`, the sourcing repository can\
3030
achieve the same effect by including the following in its `.trunk/trunk.yaml`.
3131

0 commit comments

Comments
 (0)