diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b11eb9f..7c88ca1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,7 +2,7 @@ name: CodeQL on: push: - branches: [ "master", "main" ] + branches: [ "main" ] pull_request: schedule: - cron: '00 5 * * 1' diff --git a/.golangci.yaml b/.golangci.yaml index 0a6950d..cc13efb 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,9 +1,8 @@ +version: "2" run: concurrency: 3 - timeout: 4m - linters: - enable-all: true + default: all disable: - depguard - ireturn @@ -11,5 +10,26 @@ linters: - varnamelen - wrapcheck - wsl - -linters-settings: + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index 4e431e9..c84d73f 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GOCMD = go GOTEST = $(GOCMD) test -GOLANGCI_VERSION ?= v1.64.5 +GOLANGCI_VERSION ?= v2.1.6 TOOLS_BIN := $(shell mkdir -p build/tools && realpath build/tools) GOLANGCI = $(TOOLS_BIN)/golangci-lint-$(GOLANGCI_VERSION) diff --git a/go.mod b/go.mod index c3e2908..d1253c1 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,12 @@ module github.com/go-git/go-git-fixtures/v5 // go-git supports the last 3 stable Go versions. -go 1.22 +go 1.23.0 + +toolchain go1.24.4 require ( - github.com/go-git/go-billy/v6 v6.0.0-20250226231054-855d56b95681 + github.com/go-git/go-billy/v6 v6.0.0-20250627091229-31e2a16eef30 github.com/stretchr/testify v1.10.0 ) @@ -12,6 +14,6 @@ require ( github.com/cyphar/filepath-securejoin v0.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.30.0 // indirect + golang.org/x/sys v0.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index e49ed20..faf13c4 100644 --- a/go.sum +++ b/go.sum @@ -2,14 +2,14 @@ github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22r github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-git/go-billy/v6 v6.0.0-20250226231054-855d56b95681 h1:dEJLKk2KlPXJHsKo9Yowx/Z3qaj66ylcugbnNl+LZsQ= -github.com/go-git/go-billy/v6 v6.0.0-20250226231054-855d56b95681/go.mod h1:HSPUM9l9AmLqMQiaJuOonBGMV+UQpncqo07ys+z3VBs= +github.com/go-git/go-billy/v6 v6.0.0-20250627091229-31e2a16eef30 h1:4KqVJTL5eanN8Sgg3BV6f2/QzfZEFbCd+rTak1fGRRA= +github.com/go-git/go-billy/v6 v6.0.0-20250627091229-31e2a16eef30/go.mod h1:snwvGrbywVFy2d6KJdQ132zapq4aLyzLMgpo79XdEfM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=