diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1793faa..05ab389 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -69,7 +69,7 @@ jobs: - name: Set up git user uses: fregante/setup-git-user@v2 - name: Download syft (SBOM) - uses: anchore/sbom-action/download-syft@v0.18.0 + uses: anchore/sbom-action/download-syft@v0.20.0 # Bumping logic - name: Get next version diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 56ad6e0..c422c88 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -59,7 +59,7 @@ jobs: echo "version=$(mise current golangci-lint)" >> "$GITHUB_OUTPUT" id: golangci_lint - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v8 with: version: v${{ steps.golangci_lint.outputs.version }} args: --timeout=30m diff --git a/.golangci.yml b/.golangci.yml index 158ce15..1f03a4a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,25 +1,27 @@ # yaml-language-server: $schema=https://json.schemastore.org/golangci-lint -# Linter settings -linters-settings: - errcheck: - check-blank: true - gocyclo: - min-complexity: 25 - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - lll: - line-length: 140 +version: "2" +# Linter settings linters: + settings: + errcheck: + check-blank: true + gocyclo: + min-complexity: 25 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + lll: + line-length: 140 + # Inverted configuration with enable-all and disable is not scalable # during updates of golangci-lint. - disable-all: true + default: none enable: - bodyclose - dogsled @@ -30,11 +32,8 @@ linters: - gochecknoinits - gocritic - gocyclo - - gofmt - goheader - - goimports - gosec - - gosimple - govet - ineffassign - lll @@ -42,28 +41,29 @@ linters: - nakedret - staticcheck - revive - - typecheck - unconvert - unparam - unused - whitespace -issues: - exclude: - # We allow error shadowing - - 'declaration of "err" shadows declaration at' - # Excluding configuration per-path, per-linter, per-text and per-source - exclude-rules: - # Exclude some linters from running on tests files. - - path: _test\.go - linters: - - errcheck - - funlen - - gochecknoglobals # Globals in test files are tolerated. - - gocyclo - - goheader # Don't require license headers in test files. - - gosec + exclusions: + rules: + # We allow error shadowing + - path: '(.+)\.go$' + text: 'declaration of "err" shadows declaration at' + # Exclude some linters from running on tests files. + - path: _test\.go + linters: + - errcheck + - funlen + - gochecknoglobals # Globals in test files are tolerated. + - gocyclo + - goheader # Don't require license headers in test files. + - gosec -output: - sort-results: true +# formatter settings +formatters: + enable: + - gofmt + - goimports diff --git a/.mise.toml b/.mise.toml index c2dd072..89dec73 100644 --- a/.mise.toml +++ b/.mise.toml @@ -3,10 +3,10 @@ [tools] bun = "latest" git-cliff = "latest" -golang = "1.24.0" -golangci-lint = "1.64.5" +golang = "1.24.3" +golangci-lint = "2.1.6" goreleaser = "latest" -"go:gotest.tools/gotestsum" = "1.12.0" +"go:gotest.tools/gotestsum" = "1.12.2" "go:golang.org/x/tools/cmd/goimports" = "latest" "go:mvdan.cc/sh/v3/cmd/shfmt" = "latest" "go:github.com/thenativeweb/get-next-version" = "latest" @@ -48,9 +48,8 @@ description = "Run tests" run = "gotestsum" ## <> - [tasks.generate] description = "Run codegen" -run = ["bun install","go run ./tools/codegen"] +run = ["bun install", "go run ./tools/codegen"] ## <> diff --git a/client.go b/client.go index c3cbd87..301d7af 100644 --- a/client.go +++ b/client.go @@ -16,6 +16,8 @@ // // SPDX-License-Identifier: LGPL-3.0 +// Package gitlab implements a wrapper around go-gitlab that supports +// mocking. package gitlab import ( diff --git a/stencil.lock b/stencil.lock index 36c559c..0a116f6 100644 --- a/stencil.lock +++ b/stencil.lock @@ -1,10 +1,10 @@ -version: 2.1.0 +version: 2.4.0 modules: - name: github.com/rgst-io/stencil-golang url: https://github.com/rgst-io/stencil-golang version: - commit: f0322bcd01439b092b27cbaabdf2e3e3e2d0ebe3 - tag: v1.5.0 + commit: d0b62f2c78de562b7683bfb751ff5153b0bbd165 + tag: v1.6.1 files: - name: .cliff.toml template: .cliff.toml.tpl