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
{{ message }}
This repository was archived by the owner on Aug 16, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/tools/golangci-lint.md
+33-3Lines changed: 33 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,42 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
12
12
13
13
[golangci-lint](https://golangci-lint.run/) is a fast Go linters runner.
14
14
15
+
16
+
#golangci-lint
17
+
15
18
##Files
16
19
17
-
golangci-lint will run on files with the following extensions:
20
+
`golangci-lint` is a fast Go linters runner. It is a code quality tool that aggregates many Go linters into a single tool.
21
+
22
+
##Supported Versions
23
+
24
+
CodeRabbit currently supports`golangci-lint` v1.x.
25
+
26
+
Users attempting to use`golangci-lint` v2.x may encounter warnings or unexpected behavior, as full compatibility with v2.x is not yet guaranteed. We recommend configuring your project to use`golangci-lint` v1.x if you experience issues.
27
+
28
+
##Configuration
29
+
30
+
`golangci-lint` supports the following configuration files:
31
+
32
+
-`.golangci.yml`
33
+
-`.golangci.yaml`
34
+
-`.golangci.toml`
35
+
-`.golangci.json`
36
+
37
+
CodeRabbit will automatically detect and use these configuration files if present in your repository.
38
+
39
+
##Integrating v1 alongside v2 (Workaround)
40
+
41
+
If your project requires`golangci-lint` v2 for local development or CI, but you wish to use CodeRabbit for v1-compatible linting, you can manage this by:
42
+
43
+
1.**Ensuring a v1-compatible configuration file exists:** Create or maintain a`.golangci.yml` (or other supported format) that is compatible with`golangci-lint` v1.x.
44
+
2.**Using a separate script for v2:** For your local development or CI, you might use a wrapper script or a different command to invoke`golangci-lint` v2, ensuring it uses a v2-specific configuration if needed. CodeRabbit will primarily look for the standard configuration files.
45
+
46
+
Alternatively, you can disable`golangci-lint` in CodeRabbit if v2 is strictly required and you cannot maintain a v1-compatible configuration.