-
Notifications
You must be signed in to change notification settings - Fork 38
docs: update golangci-lint docs (#406) #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,26 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; | |
|
||
[golangci-lint](https://golangci-lint.run/) is a fast Go linters runner. | ||
|
||
## Supported Version | ||
|
||
At this time, CodeRabbit uses v1.x of the `golangci-lint` tool. | ||
|
||
If you have a `golangci-lint v2` configuration file in your project, you will see a warning in CodeRabbit reviews and CodeRabbit will not be able to use `golangci-lint` to inform review comments. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The important part is that the tool won't get applied, more than the warning. How about this reword of the second part of the sentence: "[...], then CodeRabbit won't be able to use |
||
|
||
There are two ways to avoid this warning. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reword to something like "To avoid this warning, take one of the following actions:" |
||
|
||
### 1. Parallel Support for v1 (code review) and v2 (CI/CD) Linting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make this a bullet list instead of two numbered sections? |
||
|
||
This will allow v2 linting in CI/CD pipelines while also enabling CodeRabbit to use v1.x linting for review comments. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reword for present tense: "This allows", not "This will allow". |
||
|
||
- Provide a golangci-lint `version: "1"` configuration file that will not be used by golangci-lint itself, e.g. `.coderabbit-golangci.yml` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are full sentences, so put a period on the end of them please. |
||
|
||
- Set `reviews.tools.golangci-lint.config_file` to reference that file in a `.coderabbit.yaml` file | ||
|
||
### 2. Disable golangci-lint in CodeRabbit | ||
|
||
- Set `reviews.tools.golangci-lint.enabled` to false in a `.coderabbit.yaml` file in your project. | ||
|
||
## Files | ||
|
||
golangci-lint will run on files with the following extensions: | ||
|
@@ -21,7 +41,7 @@ golangci-lint will run on files with the following extensions: | |
|
||
## Configuration | ||
|
||
golangci-lint supports the following config files: | ||
golangci-lint supports v1 configuration files as follows: | ||
|
||
- User-defined config file set at `reviews.tools.golangci-lint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → golangci-lint → Config File" field in CodeRabbit's settings page. | ||
- `.golangci.yml` | ||
|
@@ -31,4 +51,5 @@ golangci-lint supports the following config files: | |
|
||
## Links | ||
|
||
- [golangci-lint Configuration](https://golangci-lint.run/usage/configuration/) | ||
- [golangci-lint v1 Configuration](https://golangci.github.io/legacy-v1-doc/usage/configuration/) | ||
- [golangci-lint v2 Configuration](https://golangci-lint.run/usage/configuration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop "At this time", please.