$ cd /usr/local/src
$ git clone --depth=1 https://github.com/fuzmish/manioc
$ cd manioc/linter/manioctypechecker
$ make build-vettool
$ ls bin
manioctypechecker
Move to your project, then run:
$ go vet -vettool=/usr/local/src/manioc/linter/manioctypechecker/bin/manioctypechecker ./...
$ golangci-lint --version
golangci-lint has version v1.46.2 built from (unknown, mod sum: "...") on (unknown)
Build a plugin binary. Set the version of golangci-lint to the environment variable GOLANGCI_LINT_TARGET_VERSION if needed:
$ cd /usr/local/src
$ git clone --depth=1 https://github.com/fuzmish/manioc
$ cd manioc/linter/manioctypechecker
$ GOLANGCI_LINT_TARGET_VERSION=v1.46.2 make build-golangci-plugin
$ ls bin
manioctypechecker.so
Move to your project, then configure your .golangci.yml:
linters-settings:
custom:
manioctypechecker:
# the path to the plugin binary
path: /usr/local/src/manioc/linter/manioctypechecker/bin/manioctypechecker.so
description: A static type checker for github.com/fuzmish/manioc
original-url: github.com/fuzmish/manioctypechecker
linters:
enable:
# then enable it
- manioctypechecker
Run:
$ golangci-lint run --disable-all -E govet,manioctypechecker