Skip to content

Commit 81a56b7

Browse files
author
Winni Neessen
authored
Merge pull request #65 from wneessen/workflow-cleanup
Workflow cleanup
2 parents 3026801 + c35683a commit 81a56b7

4 files changed

Lines changed: 58 additions & 81 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup go
3838
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
3939
with:
40-
go-version: '1.23'
40+
go-version: '1.25'
4141
- name: Run Tests
4242
run: |
4343
go test -v -shuffle=on -race --coverprofile=coverage.coverprofile --covermode=atomic ./...

.github/workflows/golangci-lint.yml

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,24 @@ permissions:
1414
contents: read
1515
# Optional: allow read access to pull request. Use with `only-new-issues` option.
1616
# pull-requests: read
17+
1718
jobs:
18-
golangci:
19-
name: lint
19+
lint:
20+
name: golangci-lint
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: Harden Runner
2324
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
2425
with:
2526
egress-policy: audit
26-
27-
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
27+
- name: Setup go
28+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
2829
with:
29-
go-version: '1.23'
30-
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
30+
go-version: '1.25'
31+
check-latest: true
32+
- name: Checkout Code
33+
uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
3134
- name: golangci-lint
32-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
35+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3336
with:
34-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
3537
version: latest
36-
37-
# Optional: working directory, useful for monorepos
38-
# working-directory: somedir
39-
40-
# Optional: golangci-lint command line arguments.
41-
# args: --issues-exit-code=0
42-
43-
# Optional: show only new issues if it's a pull request. The default value is `false`.
44-
# only-new-issues: true
45-
46-
# Optional: if set to true then the all caching functionality will be complete disabled,
47-
# takes precedence over all other caching options.
48-
# skip-cache: true
49-
50-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
51-
# skip-pkg-cache: true
52-
53-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
54-
# skip-build-cache: true

.github/workflows/sonarqube.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.golangci.toml

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,55 @@
1-
## SPDX-FileCopyrightText: 2022 Winni Neessen <wn@neessen.dev>
1+
## SPDX-FileCopyrightText: Winni Neessen <wn@neessen.dev>
22
##
33
## SPDX-License-Identifier: MIT
44

5+
version = '2'
6+
57
[run]
6-
go = "1.20"
8+
go = '1.20'
79
tests = true
810

911
[linters]
10-
enable = ["stylecheck", "whitespace", "containedctx", "contextcheck", "decorder",
11-
"errname", "errorlint", "gofmt", "gofumpt", "goimports"]
12+
enable = [
13+
'containedctx',
14+
'contextcheck',
15+
'decorder',
16+
'errname',
17+
'errorlint',
18+
'staticcheck',
19+
'whitespace'
20+
]
21+
22+
[linters.exclusions]
23+
generated = 'lax'
24+
presets = [
25+
'comments',
26+
'common-false-positives',
27+
'legacy',
28+
'std-error-handling'
29+
]
30+
paths = [
31+
'third_party$',
32+
'builtin$',
33+
'examples$'
34+
]
35+
36+
[formatters]
37+
enable = [
38+
'gofmt',
39+
'gofumpt',
40+
'goimports'
41+
]
42+
43+
[formatters.settings]
44+
[formatters.settings.goimports]
45+
local-prefixes = [
46+
'github.com/wneessen/niljson'
47+
]
1248

13-
[linters-settings.goimports]
14-
local-prefixes = "github.com/wneessen/niljson"
49+
[formatters.exclusions]
50+
generated = 'lax'
51+
paths = [
52+
'third_party$',
53+
'builtin$',
54+
'examples$'
55+
]

0 commit comments

Comments
 (0)