diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5336a0f..0a645c9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -59,7 +59,7 @@ jobs: run: | sudo apt install libx11-dev - - name: golangci-lint + - name: Run golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.1 + version: v2.6 diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 0000000..ef94577 --- /dev/null +++ b/DEVELOPING.md @@ -0,0 +1,4 @@ +## Linting + +Developers need to manually install `golangci-lint`. +See: https://golangci-lint.run/docs/welcome/install/. diff --git a/Makefile b/Makefile index d332fcc..d2fa16e 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,10 @@ check-format: ## Check that sources are correctly formatted check-vet: ## Check source files with `go vet` go vet ./... +.PHONY: lint +lint: ## Lint source files with `golangci-lint run` + golangci-lint run + ##@ Code generation .PHONY: renku-users-apispec @@ -80,8 +84,6 @@ renku-users-apispec: ## Download the "users" API spec .PHONY: renku-session-apispec renku-session-apispec: ## Download the "session" API spec curl -L -o pkg/renkuapi/session/api.spec.yaml https://raw.githubusercontent.com/SwissDataScienceCenter/renku-data-services/refs/heads/main/components/renku_data_services/session/api.spec.yaml - # sed -e 's/- default: "general"//g' pkg/renkuapi/users/api.spec.yaml > pkg/renkuapi/users/api.spec.new.yaml - # mv pkg/renkuapi/users/api.spec.new.yaml pkg/renkuapi/users/api.spec.yaml .PHONY: generate generate: pkg/renkuapi/users/users_gen.go pkg/renkuapi/session/session_gen.go ## Run go generate