Linter on CI

This commit is contained in:
Ada 2024-04-10 19:33:38 +02:00
parent b7be167dd7
commit 0e8fe2ac0f
Signed by: ada
GPG key ID: 6A7F898157C6DE6E
2 changed files with 36 additions and 0 deletions

25
.golangci.yaml Normal file
View file

@ -0,0 +1,25 @@
linters:
enable-all: true
disable:
# Deprecated
- varcheck
- ifshort
- interfacer
- maligned
- deadcode
- scopelint
- golint
- structcheck
- exhaustivestruct
- nosnakecase
# To extremist/unusable
- depguard
- varnamelen
- exhaustruct
- wsl
- contextcheck
- wrapcheck
linters-settings:
lll:
# Too short byt default
line-length: 160

11
.woodpecker/lint.yml Normal file
View file

@ -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