Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check goimports in golangci-lint #521

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.55.2
version: v1.56.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
linters:
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- gofumpt
- goimports

linters-settings:
goimports:
local-prefixes: github.com/CosmWasm/wasmvm
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ test-alpine: release-build-alpine create-tester-image
format:
find . -name '*.go' -type f | xargs gofumpt -w -s
find . -name '*.go' -type f | xargs misspell -w
find . -name '*.go' -type f | xargs goimports -w -local github.com/CosmWasm/wasmvm

.PHONY: lint
lint:
golangci-lint run

.PHONY: lint-fix
lint-fix:
golangci-lint run --fix
3 changes: 2 additions & 1 deletion lib_no_cgo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cosmwasm
import (
"testing"

"github.com/CosmWasm/wasmvm/v2/types"
"github.com/stretchr/testify/require"

"github.com/CosmWasm/wasmvm/v2/types"
)

func TestCreateChecksum(t *testing.T) {
Expand Down
Loading