Integriere golangci-lint in den Entwicklungsablauf

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Jesko Anschütz 2026-03-22 17:53:24 +01:00
parent b04acdee09
commit 1bfcdfd922
3 changed files with 20 additions and 1 deletions

9
.golangci.yml Normal file
View file

@ -0,0 +1,9 @@
version: "2"
run:
timeout: 3m
modules-download-mode: readonly
linters:
enable:
- revive

View file

@ -60,6 +60,7 @@ Spaeter zusaetzlich sinnvoll:
- `docker` und `docker compose` - `docker` und `docker compose`
- `postgresql-client` - `postgresql-client`
- `mosquitto-clients` - `mosquitto-clients`
- `golangci-lint`
Fuer Container-Builds liegen erste Dockerfiles in: Fuer Container-Builds liegen erste Dockerfiles in:
@ -114,6 +115,7 @@ Aktuell bedeutet das:
- `make run-backend` startet das Backend - `make run-backend` startet das Backend
- `make run-agent` startet den Agenten - `make run-agent` startet den Agenten
- `make fmt` formatiert beide Go-Module - `make fmt` formatiert beide Go-Module
- `make lint` prueft beide Go-Module mit `golangci-lint`
Hinweis: Hinweis:

View file

@ -1,7 +1,7 @@
BACKEND_DIR=server/backend BACKEND_DIR=server/backend
AGENT_DIR=player/agent AGENT_DIR=player/agent
.PHONY: build build-backend build-agent run-backend run-agent fmt .PHONY: build build-backend build-agent run-backend run-agent fmt lint lint-backend lint-agent
build: build-backend build-agent build: build-backend build-agent
@ -20,3 +20,11 @@ run-agent:
fmt: fmt:
cd $(BACKEND_DIR) && go fmt ./... cd $(BACKEND_DIR) && go fmt ./...
cd $(AGENT_DIR) && go fmt ./... cd $(AGENT_DIR) && go fmt ./...
lint: lint-backend lint-agent
lint-backend:
cd $(BACKEND_DIR) && golangci-lint run --config ../../.golangci.yml ./...
lint-agent:
cd $(AGENT_DIR) && golangci-lint run --config ../../.golangci.yml ./...