Skip to content

Commit

Permalink
ci: fix linting issues (#269)
Browse files Browse the repository at this point in the history
A new version of golangci-lint updated depguard, which in turn started
erroring because it was missing a config. Previously depguard did not do
anything as we never configured a list of allowed/denied imports.

In general, we already have gomodguard for linting imports.

To avoid sudden breakages of our CI in the future, I pinned the exact
version of golangci-lint to the current release. Upgrading this should
hppen through a PR process (e.g. by renovate) so we can notice new
linting failures and fix them before merging to main.
  • Loading branch information
apricote authored Jun 12, 2023
1 parent 2a7249e commit f396b84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
# Required: the version of golangci-lint is required and must be specified without patch version
version: v1.53.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variables:

test:golangci-lint:
stage: test
image: golangci/golangci-lint:latest
image: golangci/golangci-lint:v1.53.2
script:
- golangci-lint run -v
except:
Expand Down
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ linters:
disable-all: true
enable:
- bodyclose
- depguard
- errcheck
- errname
- exhaustive
Expand Down

0 comments on commit f396b84

Please sign in to comment.