Skip to content

Commit bcf4aa4

Browse files
fix: ci action for release branch
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
1 parent ab93ad4 commit bcf4aa4

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,25 @@ jobs:
2424
steps:
2525
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2626
with:
27-
go-version: "1.22"
27+
go-version: "1.23"
2828

2929
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
30+
with:
31+
fetch-depth: 0
3032

3133
- name: golangci-lint
32-
uses: golangci/golangci-lint-action@v6.2.0
34+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3335
with:
3436
# 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-
38+
args: --new-from-merge-base=origin/${{ github.base_ref }} --timeout=10m
3739
# Optional: working directory, useful for monorepos
3840
# working-directory: somedir
3941

4042
# Optional: golangci-lint command line arguments.
4143

4244
# Optional: show only new issues if it's a pull request. The default value is `false`.
43-
only-new-issues: true
45+
# only-new-issues: true
4446

4547
# Optional: if set to true then the all caching functionality will be complete disabled,
4648
# takes precedence over all other caching options.
@@ -50,4 +52,4 @@ jobs:
5052
# skip-pkg-cache: true
5153

5254
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
53-
# skip-build-cache: true
55+
# skip-build-cache: true

.golangci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Documentation: https://golangci-lint.run/usage/configuration/
2+
version: "2"
23
linters:
34
disable-all: true
45
enable:
@@ -16,11 +17,8 @@ linters:
1617
- exhaustive
1718
- goconst
1819
- gocritic
19-
- gofmt
20-
- goimports
2120
- gomodguard
2221
- gosec
23-
- gosimple
2422
- govet
2523
- ireturn
2624
- maintidx
@@ -36,12 +34,15 @@ linters:
3634
- revive
3735
- staticcheck
3836
- thelper
39-
- typecheck
4037
- unconvert
4138
- unparam
4239
- unused
4340
- usestdlibvars
4441
- whitespace
42+
formatters:
43+
enable:
44+
- gofmt
45+
- goimports
4546
linters-settings:
4647
depguard:
4748
rules:

0 commit comments

Comments
 (0)