Skip to content

Commit

Permalink
Merge pull request #398 from invidian/invidian/update-linter
Browse files Browse the repository at this point in the history
Update golangci-lint
  • Loading branch information
invidian authored Sep 11, 2024
2 parents c35ca6a + f63a969 commit 353115d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: golangci/golangci-lint:v1.59.1
container: golangci/golangci-lint:v1.61.0
steps:
- uses: actions/cache@v2
with:
Expand All @@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.22'
go-version: '1.23'
- uses: actions/cache@v2
with:
path: |
Expand All @@ -44,9 +44,9 @@ jobs:
fetch-depth: 0
- name: Install required binaries
run: |
docker-compose -f e2e/docker-compose.yml up generate-secrets
docker compose -f e2e/docker-compose.yml up generate-secrets
sudo chown $(whoami): ./e2e/secrets/*
docker-compose -f e2e/docker-compose.yml up -d
docker compose -f e2e/docker-compose.yml up -d
make install-cc-test-reporter BIN_PATH=/usr/local/bin
- run: |
export TEST_INTEGRATION_SSH_PORT=2222
Expand All @@ -73,7 +73,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.22'
go-version: '1.23'
- uses: actions/cache@v2
with:
path: |
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
sudo systemctl restart containerd
- name: Fetch dependencies and configure tests
run: |
docker-compose -f e2e/docker-compose.yml up -d
docker compose -f e2e/docker-compose.yml up -d
cat <<EOF > e2e/test-config.yaml
sshPrivateKeyPath: $(pwd)/e2e/secrets/id_rsa
nodesCIDR: 172.17.0.0/24
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- fatcontext
- forbidigo
- forcetypeassert
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.20
FROM golang:1.23-alpine3.20

# Enable go modules
ENV GO111MODULE=on
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GORUN=$(GOCMD) run
GOBUILD=$(GOCMD) build -v -ldflags $(LD_FLAGS) -trimpath

CC_TEST_REPORTER_ID=6e107e510c5479f40b0ce9166a254f3f1ee0bc547b3e48281bada1a5a32bb56d
GOLANGCI_LINT_VERSION=v1.59.1
GOLANGCI_LINT_VERSION=v1.61.0
BIN_PATH=$$HOME/bin

GO_PACKAGES=./...
Expand Down
1 change: 1 addition & 0 deletions cli/flexkube/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ func (r *Resource) StateToFile(actionErr error) error {

readWriteOwnerOnly := 0o600

// #nosec G115 // Constant conversion.
if err := os.WriteFile("state.yaml", stateRaw, fs.FileMode(readWriteOwnerOnly)); err != nil {
if actionErr == nil {
return fmt.Errorf("writing new state to file: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.20
FROM golang:1.23-alpine3.20

RUN apk add -U make bash bash-completion vim coreutils

Expand Down
2 changes: 1 addition & 1 deletion integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.20
FROM golang:1.23-alpine3.20

# Install dependencies:
# - docker for spawning further Docker containers
Expand Down
4 changes: 2 additions & 2 deletions pkg/host/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func TestValidate(t *testing.T) {

err := testCase.Host.Validate()
if testCase.Error && err == nil {
t.Fatalf(testCase.Message)
t.Fatal(testCase.Message)
}

if !testCase.Error && err != nil {
t.Errorf(testCase.Message)
t.Error(testCase.Message)
}
})
}
Expand Down

0 comments on commit 353115d

Please sign in to comment.