From 6f82f401f6431846cbadef22dabd5cd26669c93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Mon, 9 Sep 2024 16:04:13 +0200 Subject: [PATCH] chore: add support for tagalign --- .golangci.yml | 5 +++++ internal/config/config.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 23b5da0e72..3c3d51fd4d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -59,6 +59,7 @@ linters: - sloglint # ensure consistent code style when using log/slog [fast: false, auto-fix: false] - staticcheck - stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false] + - tagalign # check that struct tags are well aligned [fast: true, auto-fix: true] - tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17 [fast: false, auto-fix: false] - testifylint # Checks usage of github.com/stretchr/testify. [fast: false, auto-fix: false] - testpackage # linter that makes you use a separate _test package [fast: true, auto-fix: false] @@ -152,3 +153,7 @@ issues: linters: - revive - stylecheck + + - path: internal/namespaces/k8s/v1/types/types.go + linters: + - tagalign diff --git a/internal/config/config.go b/internal/config/config.go index 08f575cb30..3f42a861a6 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -47,7 +47,7 @@ alias: ) type Config struct { - Alias *alias.Config `json:"alias" yaml:"alias"` + Alias *alias.Config `json:"alias" yaml:"alias"` Output string `json:"output" yaml:"output"` path string