Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOJIRA] Bump golangci-lint versions & fix linter issues #290

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
# - execinquery
- exhaustive
# - exhaustruct
- exportloopref
# - exportloopref
- forbidigo
- forcetypeassert
# - gci
Expand All @@ -41,7 +41,7 @@ linters:
# - gofumpt
- goheader
- goimports
- gomnd
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
Expand Down
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ARG GO_VERSION=1.23.0
ARG XX_VERSION=1.2.1
ARG GOLANGCI_LINT_VERSION=v1.55.2
ARG GOLANGCI_LINT_VERSION=v1.62.0

# xx is a helper for cross-compilation
FROM --platform=${BUILDPLATFORM} tonistiigi/xx:${XX_VERSION} AS xx
Expand Down Expand Up @@ -72,11 +72,8 @@ RUN --mount=type=bind,target=. \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/cache/golangci-lint \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint cache status && \
find / -iname .golangci.yaml && \
pwd && \
find / -iname .golangci.yaml -exec cat {} \; && \
golangci-lint run --build-tags "$BUILD_TAGS" -c .golangci.yml ./...
echo "cache status: " && golangci-lint cache status && echo "" && \
golangci-lint run --build-tags "$BUILD_TAGS" -c /src/.golangci.yml /src/...

FROM scratch AS binary-unix
COPY --link --from=build /out/kubehound /
Expand Down
Loading