Skip to content

Bump golangci/golangci-lint-action from 6 to 7 #50

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

Merged
merged 1 commit into from
Apr 5, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
go-version: 1.24.1
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.55.2
version: v2.0.2
51 changes: 35 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,49 @@
---
version: "2"
linters:
disable-all: true
default: none
enable:
- errcheck
- godot
- gofumpt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- staticcheck
- testifylint
- testpackage
- typecheck
- unused
- whitespace
- wsl

linters-settings:
goimports:
local-prefixes: github.com/xorcare/testing-go-code-with-postgres
gofumpt:
module-path: github.com/xorcare/testing-go-code-with-postgres
unused:
field-writes-are-uses: false
post-statements-are-reads: true
exported-fields-are-used: false
local-variables-are-used: false
settings:
unused:
field-writes-are-uses: false
post-statements-are-reads: true
exported-fields-are-used: false
local-variables-are-used: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofumpt
- goimports
settings:
gofumpt:
module-path: github.com/xorcare/testing-go-code-with-postgres
goimports:
local-prefixes:
- github.com/xorcare/testing-go-code-with-postgres
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lint: tools ## Check the project with lint.

.PHONY: tools
tools: ## Install all needed tools, e.g.
@go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2
@go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2

.PHONY: help
help: ## Show help for each of the Makefile targets.
Expand Down
1 change: 1 addition & 0 deletions testingpg/testingpg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func TestNewWithTransactionalCleanup(t *testing.T) {

// Arrange
ctx := context.Background()

const sqlStr = `CREATE TABLE "no_conflict" (id integer PRIMARY KEY)`

t.Run("Arrange", func(t *testing.T) {
Expand Down