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
It's important to have reproducible CI: don't start to fail all builds at the same time.
7
+
With golangci-lint this can happen if you use option `linters.default: all` and a new linter is added
8
+
or even without `linters.default: all` when one upstream linter is upgraded.
9
+
10
+
> [!IMPORTANT]
11
+
> It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
12
+
13
+
## GitHub Actions
14
+
15
+
We recommend using [our GitHub Action](https://github.com/golangci/golangci-lint-action) for running golangci-lint in CI for GitHub projects.
16
+
17
+
It's [fast and uses smart caching](https://github.com/golangci/golangci-lint-action#performance) inside,
18
+
and it can be much faster than the simple binary installation.
19
+
20
+
Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues).
GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint).
30
+
A simple quickstart is their [CI component](https://gitlab.com/explore/catalog/components/code-quality-oss/codequality-os-scanners-integration), which can be used like this:
Note that you [can only reference components in the same GitLab instance as your project](https://docs.gitlab.com/ci/components/#use-a-component)
38
+
39
+
## Buildkite
40
+
41
+
Buildkite provides a [plugin](https://buildkite.com/resources/plugins/buildkite-plugins/golangci-lint-buildkite-plugin/) for running golangci-lint in Buildkite pipelines.
42
+
43
+
It utilizes the [Docker image of golangci-lint](/docs/welcome/install/local/#docker) by default, but can be set to use a binary if available on the agent.
44
+
45
+
The plugin will annotate builds with results, providing an easily readable summary of fixes.
Copy file name to clipboardExpand all lines: docs/content/docs/welcome/install/local.md
+16-96Lines changed: 16 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,103 +1,21 @@
1
1
---
2
-
title: "Install"
3
-
weight: 1
4
-
aliases:
5
-
- /welcome/install/
2
+
title: "Local Installation"
3
+
weight: 2
6
4
---
7
5
8
-
## CI installation
6
+
## Linux
9
7
10
-
Most installations of golangci-lint are performed for CI.
11
-
12
-
It's important to have reproducible CI: don't start to fail all builds at the same time.
13
-
With golangci-lint this can happen if you use option `linters.default: all` and a new linter is added
14
-
or even without `linters.default: all` when one upstream linter is upgraded.
15
-
16
-
> [!IMPORTANT]
17
-
> It's highly recommended installing a specific version of golangci-lint available on the [releases page](https://github.com/golangci/golangci-lint/releases).
18
-
19
-
### GitHub Actions
20
-
21
-
We recommend using [our GitHub Action](https://github.com/golangci/golangci-lint-action) for running golangci-lint in CI for GitHub projects.
22
-
23
-
It's [fast and uses smart caching](https://github.com/golangci/golangci-lint-action#performance) inside,
24
-
and it can be much faster than the simple binary installation.
25
-
26
-
Also, the action creates GitHub annotations for found issues (you don't need to dig into build log to see found by golangci-lint issues).
GitLab provides a [guide for integrating golangci-lint into the Code Quality widget](https://docs.gitlab.com/ci/testing/code_quality/#golangci-lint).
36
-
A simple quickstart is their [CI component](https://gitlab.com/explore/catalog/components/code-quality-oss/codequality-os-scanners-integration), which can be used like this:
Note that you [can only reference components in the same GitLab instance as your project](https://docs.gitlab.com/ci/components/#use-a-component)
44
-
45
-
### Buildkite
46
-
47
-
Buildkite offers a [plugin](https://buildkite.com/resources/plugins/buildkite-plugins/golangci-lint-buildkite-plugin/) for running golangci-lint in Buildkite pipelines.
48
-
49
-
It utilizes the official [Docker image](https://hub.docker.com/r/golangci/golangci-lint) by default, but can be set to use a binary if available on the agent.
50
-
51
-
The plugin will annotate builds with results, providing an easily readable summary of fixes.
52
-
53
-
```yaml {filename=".pipeline.yml"}
54
-
plugins:
55
-
- golangci-lint#v1.0.0:
56
-
config: .golangci.yml
57
-
```
58
-
59
-
### Other CI
60
-
61
-
Here is the other way to install golangci-lint:
62
-
63
-
```bash
64
-
# binary will be $(go env GOPATH)/bin/golangci-lint
0 commit comments