Skip to content

Commit 53236f8

Browse files
committed
Use go 1.24 and golangci-lint v2 (#927)
1 parent 312091f commit 53236f8

File tree

466 files changed

+47871
-14036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+47871
-14036
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,21 @@ jobs:
88
build-test-backend:
99
name: Build, lint, test backend
1010
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
go: ['1.23']
1411

1512
steps:
1613
- name: install make
1714
run: sudo apt-get install make
1815
- name: set up go 1.x
1916
uses: actions/setup-go@v3
2017
with:
21-
go-version: ${{ matrix.go }}
18+
go-version: '1.24'
2219
- name: checkout
2320
uses: actions/checkout@v3
2421
- name: build, lint, test
2522
run: make backend && git diff --exit-code
2623
- name: check clean vendors
2724
run: go mod vendor
2825
- name: Report coverage
29-
if: ${{ matrix.go == '1.23' }}
3026
uses: codecov/codecov-action@v4
3127
with:
3228
files: ./cover.out

.github/workflows/push_image.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ jobs:
1313
push-image:
1414
name: push image
1515
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
go: ['1.23']
1916
steps:
2017
- name: install make
2118
run: sudo apt-get install make
2219
- name: set up go 1.x
2320
uses: actions/setup-go@v3
2421
with:
25-
go-version: ${{ matrix.go }}
22+
go-version: '1.24'
2623
- name: checkout
2724
uses: actions/checkout@v3
2825
- name: docker login to quay.io
@@ -47,16 +44,13 @@ jobs:
4744
codecov-back:
4845
name: Codecov backend upload
4946
runs-on: ubuntu-latest
50-
strategy:
51-
matrix:
52-
go: ['1.23']
5347
steps:
5448
- name: install make
5549
run: sudo apt-get install make
5650
- name: set up go 1.x
5751
uses: actions/setup-go@v3
5852
with:
59-
go-version: ${{ matrix.go }}
53+
go-version: '1.24'
6054
- name: checkout
6155
uses: actions/checkout@v3
6256
- name: Test

.github/workflows/push_image_pr.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ jobs:
1414
if: ${{ github.event.label.name == 'ok-to-test' }}
1515
name: push PR image
1616
runs-on: ubuntu-latest
17-
strategy:
18-
matrix:
19-
go: ['1.23']
2017
steps:
2118
- name: install make
2219
run: sudo apt-get install make
2320
- name: set up go 1.x
2421
uses: actions/setup-go@v3
2522
with:
26-
go-version: ${{ matrix.go }}
23+
go-version: '1.24'
2724
- name: checkout
2825
uses: actions/checkout@v3
2926
with:

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ jobs:
1212
push-image:
1313
name: push image
1414
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
go: ['1.23']
1815
steps:
1916
- name: checkout
2017
uses: actions/checkout@v3
@@ -34,7 +31,7 @@ jobs:
3431
- name: set up go 1.x
3532
uses: actions/setup-go@v3
3633
with:
37-
go-version: ${{ matrix.go }}
34+
go-version: '1.24'
3835
- name: docker login to quay.io
3936
uses: docker/login-action@v2
4037
with:

.golangci.yml

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,59 @@
1+
version: "2"
2+
run:
3+
go: "1.23"
14
linters:
25
enable:
3-
- errcheck
4-
- errorlint
6+
- copyloopvar
57
- cyclop
8+
- errcheck
69
- errname
10+
- errorlint
711
- exhaustive
8-
- copyloopvar
912
- gocritic
10-
- gofmt
11-
- gosimple
1213
- govet
1314
- ineffassign
1415
- revive
1516
- staticcheck
16-
- stylecheck
17-
- typecheck
1817
- unused
19-
run:
20-
go: "1.22"
21-
linters-settings:
22-
gocritic:
23-
enabled-checks:
24-
- hugeParam
25-
- rangeExprCopy
26-
- rangeValCopy
27-
- indexAlloc
28-
settings:
29-
ifElseChain:
30-
minThreshold: 3
31-
cyclop:
32-
max-complexity: 20
18+
settings:
19+
cyclop:
20+
max-complexity: 20
21+
gocritic:
22+
enabled-checks:
23+
- hugeParam
24+
- rangeExprCopy
25+
- rangeValCopy
26+
- indexAlloc
27+
settings:
28+
ifElseChain:
29+
minThreshold: 3
30+
exclusions:
31+
generated: lax
32+
presets:
33+
- comments
34+
- common-false-positives
35+
- legacy
36+
- std-error-handling
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$
41+
rules:
42+
- linters:
43+
- staticcheck
44+
text: "QF1003:"
45+
- linters:
46+
- staticcheck
47+
text: "QF1008:"
48+
- linters:
49+
- revive
50+
text: "avoid meaningless package names"
51+
formatters:
52+
enable:
53+
- gofmt
54+
exclusions:
55+
generated: lax
56+
paths:
57+
- third_party$
58+
- builtin$
59+
- examples$

Dockerfile

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
ARG TARGETARCH
2-
FROM docker.io/library/node:22-alpine as web-builder
3-
4-
USER node
5-
6-
ARG BUILDSCRIPT
7-
WORKDIR /opt/app-root
8-
9-
COPY --chown=node web/package.json web/package.json
10-
COPY --chown=node web/package-lock.json web/package-lock.json
11-
WORKDIR /opt/app-root/web
12-
RUN CYPRESS_INSTALL_BINARY=0 npm --legacy-peer-deps ci
1+
FROM localhost/local-front-build:latest as web-builder
132

14-
WORKDIR /opt/app-root
15-
COPY --chown=node web web
16-
COPY mocks mocks
17-
18-
WORKDIR /opt/app-root/web
19-
RUN npm run format-all
20-
RUN npm run build$BUILDSCRIPT
21-
22-
FROM docker.io/library/golang:1.23 as go-builder
3+
ARG TARGETARCH
4+
FROM docker.io/library/golang:1.24 as go-builder
235

246
ARG TARGETARCH=amd64
257
ARG LDFLAGS

Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/library/golang:1.23
1+
FROM docker.io/library/golang:1.24
22

33
RUN apt-get update && apt-get install -y \
44
nodejs \

Dockerfile.cypress

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ WORKDIR /opt/app-root/web
2020
RUN npm run format-all
2121
RUN npm run build$BUILDSCRIPT
2222

23-
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.23 as go-builder
23+
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.24 as go-builder
2424

2525
ARG LDFLAGS
2626
WORKDIR /opt/app-root

Dockerfile.downstream

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ WORKDIR /opt/app-root/web
1818
RUN npm run format-all
1919
RUN npm run build
2020

21-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as go-builder
21+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24 as go-builder
2222

2323
ARG BUILDVERSION
2424

Dockerfile.front

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM docker.io/library/node:22-alpine as web-builder
2+
3+
USER node
4+
5+
ARG BUILDSCRIPT
6+
WORKDIR /opt/app-root
7+
8+
COPY --chown=node web/package-lock.json web/package-lock.json
9+
COPY --chown=node web/package.json web/package.json
10+
WORKDIR /opt/app-root/web
11+
RUN CYPRESS_INSTALL_BINARY=0 npm --legacy-peer-deps ci
12+
13+
WORKDIR /opt/app-root
14+
COPY --chown=node web web
15+
COPY mocks mocks
16+
17+
WORKDIR /opt/app-root/web
18+
RUN npm run format-all
19+
RUN npm run build$BUILDSCRIPT
20+
21+
FROM scratch
22+
23+
COPY --from=web-builder /opt/app-root/web/dist /opt/app-root/web/dist

0 commit comments

Comments
 (0)