From 580797e46f1e2f5c6248d35403a56eb826eadb9a Mon Sep 17 00:00:00 2001 From: ckaznocha Date: Sat, 7 Dec 2024 17:45:47 -0800 Subject: [PATCH] fix lint config --- .golangci.yml | 14 ++++++-------- go.mod | 4 +--- go.work | 2 +- intrange.go | 3 +-- intrange_test.go | 3 +-- testdata/go.mod | 2 +- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ae1d2db..83790fa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,7 @@ linters-settings: gci: - local-prefixes: github.com/ckaznocha/intrange + sections: + - prefix(github.com/ckaznocha/intrange) gocritic: enabled-tags: - diagnostic @@ -10,10 +11,7 @@ linters-settings: - style goimports: local-prefixes: github.com/ckaznocha/intrange - golint: - min-confidence: 0 govet: - check-shadowing: true enable: - asmdecl - assign @@ -24,6 +22,7 @@ linters-settings: - cgocall - composite - copylock + - copyloopvar - deepequalerrors - errorsas - fieldalignment @@ -57,14 +56,13 @@ linters: - dupl - errcheck - errorlint - - exportloopref - gci - gochecknoinits - goconst - gocritic - godot - godox - - goerr113 + - err113 - gofmt - gofumpt - goimports @@ -93,6 +91,6 @@ linters: - wastedassign - whitespace - wsl -run: - skip-dirs: +issues: + exclude-dirs: - testdata/ diff --git a/go.mod b/go.mod index 413b62c..e2d0619 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/ckaznocha/intrange -go 1.22.9 - -toolchain go1.23.4 +go 1.22.1 require ( github.com/gostaticanalysis/testutil v0.5.0 diff --git a/go.work b/go.work index 7c54211..73ce6b1 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.22.9 +go 1.22.1 use ( . diff --git a/intrange.go b/intrange.go index 229c847..9dada72 100644 --- a/intrange.go +++ b/intrange.go @@ -6,11 +6,10 @@ import ( "go/ast" "go/token" "go/types" - "strconv" - "golang.org/x/tools/go/analysis" "golang.org/x/tools/go/analysis/passes/inspect" "golang.org/x/tools/go/ast/inspector" + "strconv" ) var ( diff --git a/intrange_test.go b/intrange_test.go index 11b9529..08ae055 100644 --- a/intrange_test.go +++ b/intrange_test.go @@ -1,10 +1,9 @@ package intrange_test import ( - "testing" - "github.com/gostaticanalysis/testutil" "golang.org/x/tools/go/analysis/analysistest" + "testing" "github.com/ckaznocha/intrange" ) diff --git a/testdata/go.mod b/testdata/go.mod index ef7fd8f..99259e6 100644 --- a/testdata/go.mod +++ b/testdata/go.mod @@ -1,5 +1,5 @@ module github.com/ckaznocha/intrange/testdata -go 1.22.9 +go 1.22.1 require google.golang.org/protobuf v1.33.0