-
Notifications
You must be signed in to change notification settings - Fork 39
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?
Conversation
- document the use of v1 - document configuring parallel use of v1 and v2 linters for the same project for code review and CI/Cd, respectively; OR suggest to disable linting in code reviews to avoid a warning - provide links to both v1 and v2 configuration documentation
WalkthroughThe documentation for the Changes
Poem
✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/tools/golangci-lint.md (3)
15-21
: Suggestion: Use plural for section header and clarify scope.Consider renaming “## Supported Version” to “## Supported Versions” to reflect both v1 and v2 handling. You might also briefly note that v2 configs trigger a warning.
23-30
: Nitpick: Add comma for improved readability.Insert a comma after “pipelines” to separate clauses more cleanly:
- This will allow v2 linting in CI/CD pipelines while also enabling CodeRabbit to use v1.x linting for review comments. + This will allow v2 linting in CI/CD pipelines, while also enabling CodeRabbit to use v1.x linting for review comments.
44-44
: Consider clarifying v1-only support wording.You could revise to “supports only v1 configuration file formats” to reinforce that v2 configs aren’t accepted here.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/tools/golangci-lint.md
(3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/tools/golangci-lint.md
[uncategorized] ~25-~25: Possible missing comma found.
Context: ...ng This will allow v2 linting in CI/CD pipelines while also enabling CodeRabbit to use v...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (2)
docs/tools/golangci-lint.md (2)
31-34
: Clear disabling instructions.The “Disable golangci-lint in CodeRabbit” section is concise and the example config key is accurate.
54-56
: Links section updated.The added links to both v1 and v2 configuration docs are correct and helpful.
@@ -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. |
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.
|
||
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 comment
The 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 golangci-lint
to review pull requests. In this case, CodeRabbit includes a warning message about the configuration file in its reviews, instead.
|
||
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 are two ways to avoid this warning. |
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.
Reword to something like "To avoid this warning, take one of the following actions:"
|
||
There are two ways to avoid this warning. | ||
|
||
### 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a bullet list instead of two numbered sections?
|
||
### 1. Parallel Support for v1 (code review) and v2 (CI/CD) Linting | ||
|
||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Reword for present tense: "This allows", not "This will allow".
|
||
This will allow v2 linting in CI/CD pipelines while also enabling CodeRabbit to use v1.x linting for review comments. | ||
|
||
- 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 comment
The 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.
document the use of v1
document configuring parallel use of v1 and v2 linters for the same project for code review and CI/Cd, respectively; OR suggest to disable linting in code reviews to avoid a warning
provide links to both v1 and v2 configuration documentation