From caaae7e7322b15a3b4172aba51e50d647ae0f2d7 Mon Sep 17 00:00:00 2001 From: Ada Date: Wed, 10 Apr 2024 19:33:38 +0200 Subject: [PATCH] :sparkles: Linter on CI --- .golangci.yaml | 25 +++++++++++++++++++++++++ .woodpecker/lint.yml | 11 +++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .golangci.yaml create mode 100644 .woodpecker/lint.yml diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..e3bdba6 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,25 @@ +linters: + enable-all: true + disable: + # Deprecated + - varcheck + - ifshort + - interfacer + - maligned + - deadcode + - scopelint + - golint + - structcheck + - exhaustivestruct + - nosnakecase + # Too extremist/unusable + - depguard + - varnamelen + - exhaustruct + - wsl + - contextcheck + - wrapcheck +linters-settings: + lll: + # Too short byt default + line-length: 160 diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..ad11d94 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,11 @@ +steps: + lint: + image: golang:1.22 + commands: + - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + - golangci-lint run + when: + - event: pull_request + repo: gnouseu/plakken + - event: push + branch: main \ No newline at end of file