mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-12 14:01:14 +00:00
docs: organize options
This commit is contained in:
parent
7a13e2fb7d
commit
bae7e22b0f
1 changed files with 79 additions and 54 deletions
133
README.md
133
README.md
|
|
@ -259,7 +259,26 @@ You will also likely need to add the following `.gitattributes` file to ensure t
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
### `version`
|
### Overview
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
|---------------------------------------------------------------|----------------------------------------------------|
|
||||||
|
| [`version`](#version) | The version of golangci-lint to use. |
|
||||||
|
| [`install-mode`](#install-mode) | The mode to install golangci-lint. |
|
||||||
|
| [`install-only`](#install-only) | Only install golangci-lint. |
|
||||||
|
| [`verify`](#verify) | Validates golangci-lint configuration file. |
|
||||||
|
| [`github-token`](#github-token) | Used by the `only-new-issues` option. |
|
||||||
|
| [`only-new-issues`](#only-new-issues) | Show only new issues. |
|
||||||
|
| [`working-directory`](#working-directory) | The golangci-lint working directory. |
|
||||||
|
| [`args`](#args) | Golangci-lint command line arguments. |
|
||||||
|
| [`skip-cache`](#skip-cache) | Disable cache support. |
|
||||||
|
| [`skip-save-cache`](#skip-save-cache) | Don't save cache. |
|
||||||
|
| [`cache-invalidation-interval`](#cache-invalidation-interval) | Number of days before cache invalidation. |
|
||||||
|
| [`problem-matchers`](#problem-matchers) | Forces the usage of the embedded problem matchers. |
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
#### `version`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -282,7 +301,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `install-mode`
|
#### `install-mode`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -304,7 +323,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `install-only`
|
#### `install-only`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -325,27 +344,9 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `github-token`
|
### Run
|
||||||
|
|
||||||
(optional)
|
#### `verify`
|
||||||
|
|
||||||
When using the `only-new-issues` option, the GitHub API is used, so a token is required.
|
|
||||||
|
|
||||||
By default, it uses the `github.token` from the action.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Example</summary>
|
|
||||||
|
|
||||||
```yml
|
|
||||||
uses: golangci/golangci-lint-action@v9
|
|
||||||
with:
|
|
||||||
github-token: xxx
|
|
||||||
# ...
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### `verify`
|
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -368,7 +369,27 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `only-new-issues`
|
#### `github-token`
|
||||||
|
|
||||||
|
(optional)
|
||||||
|
|
||||||
|
When using the `only-new-issues` option, the GitHub API is used, so a token is required.
|
||||||
|
|
||||||
|
By default, it uses the `github.token` from the action.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Example</summary>
|
||||||
|
|
||||||
|
```yml
|
||||||
|
uses: golangci/golangci-lint-action@v9
|
||||||
|
with:
|
||||||
|
github-token: xxx
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### `only-new-issues`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -393,7 +414,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `working-directory`
|
#### `working-directory`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -411,7 +432,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `args`
|
#### `args`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -438,33 +459,9 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `problem-matchers`
|
### Cache
|
||||||
|
|
||||||
(optional)
|
#### `skip-cache`
|
||||||
|
|
||||||
Forces the usage of the embedded problem matchers.
|
|
||||||
|
|
||||||
By default, the [problem matcher of Go (`actions/setup-go`)](https://github.com/actions/setup-go/blob/main/matchers.json) already handles the default golangci-lint output (`text`).
|
|
||||||
|
|
||||||
Works only with the `text` format (the golangci-lint default).
|
|
||||||
|
|
||||||
https://golangci-lint.run/usage/configuration/#output-configuration
|
|
||||||
|
|
||||||
The default value is `false`.
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Example</summary>
|
|
||||||
|
|
||||||
```yml
|
|
||||||
uses: golangci/golangci-lint-action@v9
|
|
||||||
with:
|
|
||||||
problem-matchers: true
|
|
||||||
# ...
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### `skip-cache`
|
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -485,7 +482,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `skip-save-cache`
|
#### `skip-save-cache`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -505,7 +502,7 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### `cache-invalidation-interval`
|
#### `cache-invalidation-interval`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
|
|
@ -527,6 +524,34 @@ with:
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Extra
|
||||||
|
|
||||||
|
#### `problem-matchers`
|
||||||
|
|
||||||
|
(optional)
|
||||||
|
|
||||||
|
Forces the usage of the embedded problem matchers.
|
||||||
|
|
||||||
|
By default, the [problem matcher of Go (`actions/setup-go`)](https://github.com/actions/setup-go/blob/main/matchers.json) already handles the default golangci-lint output (`text`).
|
||||||
|
|
||||||
|
Works only with the `text` format (the golangci-lint default).
|
||||||
|
|
||||||
|
https://golangci-lint.run/usage/configuration/#output-configuration
|
||||||
|
|
||||||
|
The default value is `false`.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Example</summary>
|
||||||
|
|
||||||
|
```yml
|
||||||
|
uses: golangci/golangci-lint-action@v9
|
||||||
|
with:
|
||||||
|
problem-matchers: true
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## Annotations
|
## Annotations
|
||||||
|
|
||||||
Currently, GitHub parses the action's output and creates [annotations](https://github.blog/2018-12-14-introducing-check-runs-and-annotations/).
|
Currently, GitHub parses the action's output and creates [annotations](https://github.blog/2018-12-14-introducing-check-runs-and-annotations/).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue