Repository navigation
·
3 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
goroutinectx can now run inside golangci-lint, as a module plugin. Nothing changes for the command or go vet.
golangci-lint
goroutinectx is not bundled with golangci-lint, so build a binary that holds it. (#77)
.custom-gcl.yml:
version: v2.13.1 # the golangci-lint release to build
plugins:
- module: github.com/mpyw/goroutinectx
import: github.com/mpyw/goroutinectx/plugin
version: v0.12.0.golangci.yml:
version: "2"
linters:
enable:
- goroutinectx
settings:
custom:
goroutinectx:
type: module
description: Checks goroutine context propagation.
settings:
goroutine-deriver: github.com/my-example-app/telemetry/apm.NewGoroutineContext
context-carriers:
- github.com/labstack/echo/v4.Context
external-spawner:
- github.com/example/workerpool.Pool.Submit
spawnerlabel: truegolangci-lint custom # writes ./custom-gcl
./custom-gcl run ./...The keys under settings are the flag names. A key left out keeps its default, and an unknown key stops the run.
| Key | Flag | Setting |
|---|---|---|
goroutine-deriver |
A string | The same string. , means OR and + means AND, so it stays one string |
external-spawner, context-carriers |
A comma-separated string | A list, one name per item |
Each checker, such as goroutine or spawnerlabel |
A bool | A bool |
Other changes
- The run logic moves from
analyzer.gotointernal/run, so the flags and the plugin build the same configuration. The flags, their defaults, andErrNoInspectorare unchanged. (#77) - The agent skills vendored from declscope are updated to 0.18.0.
Install
mise use "github:mpyw/goroutinectx@0.12.0"Full changelog: v0.11.0...v0.12.0