Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

docs: Add golangci-lint version support and v2 integration guidance#496

Open
devdattatalele wants to merge2 commits intocoderabbitai:main
base:main
Choose a base branch
Loading
fromdevdattatalele:fix-issue-406-20250811-213221
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletionsdocs/tools/golangci-lint.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,12 +12,42 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';

[golangci-lint](https://golangci-lint.run/) is a fast Go linters runner.


# golangci-lint

## Files

golangci-lint will run on files with the following extensions:
`golangci-lint` is a fast Go linters runner. It is a code quality tool that aggregates many Go linters into a single tool.

## Supported Versions

CodeRabbit currently supports `golangci-lint` v1.x.

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.

## Configuration

`golangci-lint` supports the following configuration files:

- `.golangci.yml`
- `.golangci.yaml`
- `.golangci.toml`
- `.golangci.json`

CodeRabbit will automatically detect and use these configuration files if present in your repository.

## Integrating v1 alongside v2 (Workaround)

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:

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.
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.

Alternatively, you can disable `golangci-lint` in CodeRabbit if v2 is strictly required and you cannot maintain a v1-compatible configuration.

## Features

- `.go`
- `go.mod`
`golangci-lint` can detect many issues such as:

## Configuration

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp