From 95532d015517ccf8f423fd22fcf548f569411c29 Mon Sep 17 00:00:00 2001 From: Sam Herrmann Date: Mon, 14 Aug 2023 17:13:57 -0400 Subject: [PATCH] Replace golint with staticcheck --- .github/workflows/test.yml | 6 +++--- example/example.go | 1 + generate/generate.go | 1 + internal/registry/registry.go | 2 ++ internal/template/template.go | 1 + pkg/moq/moq.go | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c68745..740dfd5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,10 +40,10 @@ jobs: run: go vet ./... - name: Lint - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.19.x' run: | - go install golang.org/x/lint/golint@latest - golint ./... + go install honnef.co/go/tools/cmd/staticcheck@2023.1.3 + staticcheck -checks=all ./... - name: Test run: go test ./... diff --git a/example/example.go b/example/example.go index 84cf9dd..c18a343 100644 --- a/example/example.go +++ b/example/example.go @@ -1,3 +1,4 @@ +// Package example demonstrates how to use moq with the go:generate directive. package example import "context" diff --git a/generate/generate.go b/generate/generate.go index c3b598b..9c7355f 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -1,3 +1,4 @@ +// Package generate demonstrates how to use moq with the go:generate directive. package generate // In a terminal, run `go generate` in this directory to have diff --git a/internal/registry/registry.go b/internal/registry/registry.go index a237cdc..2e68e61 100644 --- a/internal/registry/registry.go +++ b/internal/registry/registry.go @@ -1,3 +1,5 @@ +// Package registry provides the ability to encapsulate type information for the +// source and mock destination package. package registry import ( diff --git a/internal/template/template.go b/internal/template/template.go index 9e2672c..e64adb6 100644 --- a/internal/template/template.go +++ b/internal/template/template.go @@ -1,3 +1,4 @@ +// Package template defines the template for the Moq generated code. package template import ( diff --git a/pkg/moq/moq.go b/pkg/moq/moq.go index e8a2975..9107240 100644 --- a/pkg/moq/moq.go +++ b/pkg/moq/moq.go @@ -1,3 +1,4 @@ +// Package moq provides the ability to generate mocks for interfaces. package moq import (