Skip to content
Closed
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/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
74 changes: 37 additions & 37 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -30,40 +32,38 @@ linters:
- gochecknoinits
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- 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
9 changes: 4 additions & 5 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -48,9 +48,8 @@ description = "Run tests"
run = "gotestsum"

## <<Stencil::Block(custom)>>

[tasks.generate]
description = "Run codegen"
run = ["bun install","go run ./tools/codegen"]
run = ["bun install", "go run ./tools/codegen"]

## <</Stencil::Block>>
2 changes: 2 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
//
// SPDX-License-Identifier: LGPL-3.0

// Package gitlab implements a wrapper around go-gitlab that supports
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was required for golangci-lint.

// mocking.
package gitlab

import (
Expand Down
6 changes: 3 additions & 3 deletions stencil.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.