You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://opencollective.com/golangci-lint)
`golangci-lint` is a free and open-source project built by volunteers.
20
20
21
-
If you value it, consider supporting us, we appreciate it! :heart:
21
+
If you value it, consider supporting us; we appreciate it! :heart:
22
22
23
23
## How to use
24
24
@@ -251,7 +251,7 @@ You will also likely need to add the following `.gitattributes` file to ensure t
251
251
* `v4.0.0+` requires an explicit `actions/setup-go` installation step before using this action: `uses: actions/setup-go@v5`.
252
252
The `skip-go-installation` option has been removed.
253
253
* `v2.0.0+` works with `golangci-lint` version >= `v1.28.3`
254
-
* `v1.2.2` is deprecated due to we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
254
+
* `v1.2.2` is deprecated because we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
255
255
* `v1.2.1` works with `golangci-lint` version >= `v1.14.0` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
256
256
257
257
## Options
@@ -325,10 +325,10 @@ with:
325
325
326
326
This option is `true` by default.
327
327
328
-
If the GitHub Action detects configuration file the validation will be performed unless this option is set to `false`.
328
+
If the GitHub Action detects a configuration file, the validation will be performed unless this option is set to `false`.
329
329
If there is no configuration file, the validation is skipped.
330
330
331
-
The JSONSchema used to validate the configuration depends on the version of golangci-lint you are using.
331
+
The JSON Schema used to validate the configuration depends on the version of golangci-lint you are using.
332
332
333
333
<details>
334
334
<summary>Example</summary>
@@ -350,8 +350,8 @@ Show only new issues.
350
350
351
351
The default value is `false`.
352
352
353
-
* `pull_request` and `pull_request_target`: the action gets the diff of the PR content from the [GitHub API](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request) and use it with `--new-from-patch`.
354
-
* `push`: the action gets the diff of the push content (difference between commits before and after the push) from the [GitHub API](https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#compare-two-commits) and use it with `--new-from-patch`.
353
+
* `pull_request` and `pull_request_target`: the action gets the diff of the PR content from the [GitHub API](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request) and uses it with `--new-from-patch`.
354
+
* `push`: the action gets the diff of the push content (difference between commits before and after the push) from the [GitHub API](https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#compare-two-commits) and uses it with `--new-from-patch`.
355
355
* `merge_group`: the action gets the diff by using `--new-from-rev` option (relies on git).
356
356
You should add the option `fetch-depth: 0` to `actions/checkout` step.
357
357
@@ -391,8 +391,12 @@ with:
391
391
392
392
golangci-lint command line arguments.
393
393
394
-
Note: By default, the `.golangci.yml` file should be at the root of the repository.
395
-
The location of the configuration file can be changed by using `--config=`
394
+
> [!NOTE]
395
+
> By default, the `.golangci.yml` file should be at the root of the repository.
396
+
> The location of the configuration file can be changed by using `--config=`.
397
+
398
+
> [!IMPORTANT]
399
+
> Adding a `=` between the flag name and its value is important because the action parses the arguments on spaces.
396
400
397
401
<details>
398
402
<summary>Example</summary>
@@ -459,7 +463,7 @@ with:
459
463
460
464
(optional)
461
465
462
-
If set to `true`, caches will not be saved, but they may still be restored, required`skip-cache: false`.
466
+
If set to `true`, caches will not be saved, but they may still be restored, requiring`skip-cache: false`.
463
467
464
468
The default value is `false`.
465
469
@@ -483,7 +487,7 @@ Periodically invalidate the cache every `cache-invalidation-interval` days to en
483
487
484
488
The default value is `7`.
485
489
486
-
If set the number is `<= 0`, the cache will be always invalidate (Not recommended).
490
+
If the number is `<= 0`, the cache will always be invalidated (Not recommended).
487
491
488
492
<details>
489
493
<summary>Example</summary>
@@ -518,7 +522,7 @@ permissions:
518
522
pull-requests: read
519
523
```
520
524
521
-
For annotations to work use the default format output (`text`) and either use `actions/setup-go` in the job or enable the internal [problem matchers](#problem-matchers).
525
+
For annotations to work, use the default format output (`text`) and either use `actions/setup-go` in the job or enable the internal [problem matchers](#problem-matchers).
0 commit comments