From a7d10abdd9170598e649b8ef697716919bc7d7af Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:15:32 +0000 Subject: [PATCH 1/2] chore(deps): update dependency golangci/golangci-lint to v1.63.3 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index c0223b55..48e2391b 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -32,7 +32,7 @@ jobs: - uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 with: # renovate: datasource=github-releases depName=golangci/golangci-lint - version: v1.62.2 + version: v1.63.3 tests: name: Run tests From abd1e83f3712697d010e449de04cc68041b4ff14 Mon Sep 17 00:00:00 2001 From: Antoine Gelloz Date: Fri, 3 Jan 2025 11:44:27 +0100 Subject: [PATCH 2/2] fix: linters --- Makefile | 16 ++++++++-------- pkg/graphviz/graphviz_test.go | 4 +--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 6b0e3332..02f67ff4 100644 --- a/Makefile +++ b/Makefile @@ -29,18 +29,18 @@ docs: build qa: lint test -# renovate: datasource=github-releases depName=radiofrance/lint-config -LINT_CONFIG_VERSION=v1.0.1 +LINT_CONFIG_VERSION = v1.0.2 + lint: ## Lint source code curl -o .golangci.yml -sS "https://raw.githubusercontent.com/radiofrance/lint-config/${LINT_CONFIG_VERSION}/.golangci.yml" golangci-lint run --verbose -PKG := "./..." -RUN := ".*" -RED := $(shell tput setaf 1) -GREEN := $(shell tput setaf 2) -BLUE := $(shell tput setaf 4) -RESET := $(shell tput sgr0) +PKG = ./... +RUN = ".*" +RED = $(shell tput setaf 1) +GREEN = $(shell tput setaf 2) +BLUE = $(shell tput setaf 4) +RESET = $(shell tput sgr0) .PHONY: test test: ## Run tests diff --git a/pkg/graphviz/graphviz_test.go b/pkg/graphviz/graphviz_test.go index 274ebdd1..54c660be 100644 --- a/pkg/graphviz/graphviz_test.go +++ b/pkg/graphviz/graphviz_test.go @@ -23,9 +23,7 @@ func Test_GenerateDotviz(t *testing.T) { map[string]string{}) require.NoError(t, err) - dir, err := os.MkdirTemp("/tmp", "dib-test") - require.NoError(t, err) - defer os.RemoveAll(dir) + dir := t.TempDir() dotFile := path.Join(dir, "dib.dot") err = graphviz.GenerateDotviz(graph, dotFile)