From 865d34fde1c1444505ebe8716c2b4d27e946e6a2 Mon Sep 17 00:00:00 2001 From: Silke Hofstra Date: Mon, 11 Sep 2023 20:00:45 +0200 Subject: [PATCH] Enable and appease the tagalign linter --- .golangci.yaml | 5 ++++- cli/cli.go | 12 ++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 8fa67ad..c7666d9 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -12,7 +12,6 @@ linters: - godox - revive - stylecheck - - tagalign - wrapcheck # Disabled permanently - exhaustruct # structs may be uninitialized @@ -113,6 +112,10 @@ linters-settings: - short - long - desc + - cmd + - arg + - aliases + - help varnamelen: min-name-length: 1 diff --git a/cli/cli.go b/cli/cli.go index bba3f86..9ed5a66 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -23,18 +23,18 @@ var Version string = "unknown" // GlobalFlags contains the flags for all commands. type GlobalFlags struct { - Debug bool `short:"d" long:"debug" help:"Run in debug mode."` - Chroot bool `short:"c" long:"chroot" help:"Specify that command is being run from a chrooted environment."` //nolint:lll - Live bool `short:"l" long:"live" help:"Specify that command is being run from a live medium."` - Version kong.VersionFlag `short:"v" long:"version" help:"Print version and exit."` + Debug bool `short:"d" long:"debug" help:"Run in debug mode."` + Chroot bool `short:"c" long:"chroot" help:"Specify that command is being run from a chrooted environment."` //nolint:lll + Live bool `short:"l" long:"live" help:"Specify that command is being run from a live medium."` + Version kong.VersionFlag `short:"v" long:"version" help:"Print version and exit."` } type arguments struct { GlobalFlags - Run run `cmd:"" aliases:"r" help:"Run specified trigger(s) to update the system configuration."` + Run run `cmd:"" aliases:"r" help:"Run specified trigger(s) to update the system configuration."` List list `cmd:"" aliases:"ls" help:"List available triggers to run (user-specific)."` - Graph graph `cmd:"" aliases:"g" help:"Print the dependencies for all available triggers."` + Graph graph `cmd:"" aliases:"g" help:"Print the dependencies for all available triggers."` } func Parse() (*kong.Context, GlobalFlags) {