Skip to content
Merged
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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
container: golangci/golangci-lint:v1.64.8-alpine
container: golangci/golangci-lint:v2.1.5-alpine
steps:
- uses: actions/checkout@v4
- run: |
# We need this go flag because it started to error after golangci-lint is using Go 1.21.
# TODO(slok): Remove it on next (>1.54.1) golangci-lint upgrade to check if this problem has gone.
export GOFLAGS="-buildvcs=false"
./scripts/check/check.sh

unit-test:
Expand Down
35 changes: 22 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
---
version: "2"
run:
timeout: 3m
build-tags:
- integration

linters:
enable:
- godot
- misspell
- goimports
- revive
settings:
revive:
rules:
# Spammy linter and complex to fix on lots of parameters. Makes more harm that it solves.
- name: unused-parameter
disabled: true
staticcheck:
checks:
- all
# Omit embedded fields from selector expression.
# https://staticcheck.dev/docs/checks/#QF1008
- -QF1008
exclusions:
generated: lax
presets:
- comments
- std-error-handling
formatters:
enable:
- gofmt
#- depguard
- godot

linters-settings:
revive:
rules:
# Spammy linter and complex to fix on lots of parameters. Makes more harm that it solves.
- name: unused-parameter
disabled: true
- goimports
2 changes: 1 addition & 1 deletion cmd/kube-code-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func generateGoCode(ctx context.Context, cmdCfg CmdConfig, logger log.Logger, ge
}

if filepath.IsAbs(cmdCfg.GoCodeOutPath) {
return fmt.Errorf("Go generated code path should be relative")
return fmt.Errorf("go generated code path should be relative")
}

err := os.MkdirAll(cmdCfg.GoCodeOutPath, os.ModePerm)
Expand Down
2 changes: 1 addition & 1 deletion docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.24

ARG GOLANGCI_LINT_VERSION="1.64.8"
ARG GOLANGCI_LINT_VERSION="2.1.5"
ARG MOCKERY_VERSION="3.2.5"
ARG ostype=Linux

Expand Down
2 changes: 1 addition & 1 deletion scripts/check/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -o errexit
set -o nounset

golangci-lint run
GOFLAGS="-buildvcs=false" golangci-lint run