ci: fix listing issues and enable exit code for static-analysis job
The static-analysis
job runs golangci-lint
with the option --issues-exit-code 0
, which means the job will pass even if there are failures.
This has caused a long backlog of linting issues that we have been ignoring for a while.
We should probably change the exit code to 1, and fix all the issues at once.
We also use the image registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
which uses an older version of the linter (1.50.1), yet the linter is already on version v1.54.2
. I wonder why we use that image for the linter and not the official one too.