Skip to content

Commit

Permalink
doc: improve options documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed May 4, 2024
1 parent d9c9b53 commit ca8befd
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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`.

Expand All @@ -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`.

Expand All @@ -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
Expand All @@ -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`.

Expand All @@ -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
Expand All @@ -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`.
Expand All @@ -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=`

Expand Down

0 comments on commit ca8befd

Please sign in to comment.