doc: improve options documentation
This commit is contained in:
parent
d9c9b53e53
commit
ca8befdfb6
32
README.md
32
README.md
@ -100,7 +100,9 @@ You will also likely need to add the following `.gitattributes` file to ensure t
|
||||
|
||||
## Options
|
||||
|
||||
`version`: (required) The version of golangci-lint to use.
|
||||
### `version`
|
||||
|
||||
(required) The version of golangci-lint to use.
|
||||
* When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
|
||||
* When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
|
||||
|
||||
@ -111,7 +113,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`install-mode`: (optional) The mode to install golangci-lint.
|
||||
### `install-mode`
|
||||
|
||||
(optional) The mode to install golangci-lint.
|
||||
It can be `binary` or `goinstall`.
|
||||
The default value is `binary`.
|
||||
|
||||
@ -122,7 +126,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`only-new-issues`: (optional) Show only new issues.
|
||||
### `only-new-issues`
|
||||
|
||||
(optional) Show only new issues.
|
||||
If you are using `merge_group` event (merge queue) you should add the option `fetch-depth: 0` to `actions/checkout` step.
|
||||
The default value is `false`.
|
||||
|
||||
@ -133,7 +139,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`working-directory`: (optional) working directory, useful for monorepos.
|
||||
### `working-directory`
|
||||
|
||||
(optional) working directory, useful for monorepos.
|
||||
|
||||
```yml
|
||||
uses: golangci/golangci-lint-action@v5
|
||||
@ -142,7 +150,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`skip-cache`: (optional) If set to `true`, then all caching functionality will be completely disabled,
|
||||
### `skip-cache`
|
||||
|
||||
(optional) If set to `true`, then all caching functionality will be completely disabled,
|
||||
takes precedence over all other caching options.
|
||||
The default value is `false`.
|
||||
|
||||
@ -153,7 +163,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`skip-save-cache`: (optional) If set to `true`, caches will not be saved, but they may still be restored, required `skip-cache: false`.
|
||||
### `skip-save-cache`
|
||||
|
||||
(optional) If set to `true`, caches will not be saved, but they may still be restored, required `skip-cache: false`.
|
||||
The default value is `false`.
|
||||
|
||||
```yml
|
||||
@ -163,7 +175,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`annotations`: (optional) To enable/disable GitHub Action annotations.
|
||||
### `annotations`
|
||||
|
||||
(optional) To enable/disable GitHub Action annotations.
|
||||
If disabled (`false`), the output format(s) will follow the golangci-lint configuration file and use the same default as golangci-lint (i.e. `colored-line-number`).
|
||||
https://golangci-lint.run/usage/configuration/#output-configuration
|
||||
The default value is `true`.
|
||||
@ -175,7 +189,9 @@ with:
|
||||
# ...
|
||||
```
|
||||
|
||||
`args`: (optional) golangci-lint command line arguments.
|
||||
### `args`
|
||||
|
||||
(optional) golangci-lint command line arguments.
|
||||
Note: By default, the `.golangci.yml` file should be at the root of the repository.
|
||||
The location of the configuration file can be changed by using `--config=`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user