Setup
-
Make sure your project has /tmp in the .gitignore file.
-
Add a custom section to the linters-settings section of the project's .golangci.yml as shown below. Replace v0.0.3 with the version of the linter you want to use.
linters-settings:
custom:
ccclint:
path: tmp/ccc-lint/v0.0.3/ccc-lint.so
original-url: github.com/cccteam/ccc
- Install the ccclint utility.
go install github.com/cccteam/ccc/lint/cmd/ccclint@latest
- Run the ccclint utility from the root directory of your project. If your
$GOPATH/bin is set up in your $PATH, you can now just simply run it:
ccclint
- Update your project to use
golang-ci.yml@v5.4.0 or greater. Also make sure golangci-lint-version is 'v1.64' or later.
golang-ci:
needs: env-setup
uses: cccteam/github-workflows/.github/workflows/golang-ci.yml@v5.4.0
with:
build-tags: '["", "dev"]'
golangci-lint-version: 'v1.64'
- Update your project's readme with the steps to install the lint plugin:
go install github.com/cccteam/ccc/lint/cmd/ccclint@latest
ccclint