Fix lint errors and bump golangci-lint to v2/action v9
CI / Test (linux/amd64) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Cross-build (darwin/amd64) (push) Waiting to run
CI / Cross-build (linux/amd64) (push) Waiting to run
CI / Cross-build (darwin/arm64) (push) Waiting to run
CI / Cross-build (linux/arm64) (push) Waiting to run

- Migrate .golangci.yml to golangci-lint v2 config format
- Bump golangci-lint-action from v6 (Node 20, deprecated) to v9 (Node 24)
- Fix errcheck: check fmt.Fscanln and fmt.Sscanf return values
- Fix ineffassign: replace unused vars with _ in test files
- Fix revive unused-parameter: rename unused cmd/args/r/c params to _
- Fix revive empty-block: invert if condition in push command
- Fix revive redefines-builtin-id: rename 'clear' to 'clearsigned'
- Fix revive blank-imports: add comment on modernc.org/sqlite import
- Fix unused: remove unused 'suite' and 'gen' fields from cache entry
This commit is contained in:
2026-06-28 17:07:50 -05:00
parent f7ccf67b8a
commit c5e64cf63f
19 changed files with 84 additions and 71 deletions
+7 -7
View File
@@ -15,7 +15,7 @@ func (r *Root) loginCmd() *cobra.Command {
Use: "login [server]",
Short: "Log in to a urapt server and save an API token",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
server := r.flagServer
if len(args) == 1 {
server = args[0]
@@ -65,7 +65,7 @@ func (r *Root) logoutCmd() *cobra.Command {
return &cobra.Command{
Use: "logout",
Short: "Revoke the current API token and clear the saved profile",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
c, err := r.client()
if err != nil {
return err
@@ -86,7 +86,7 @@ func (r *Root) whoamiCmd() *cobra.Command {
return &cobra.Command{
Use: "whoami",
Short: "Show the currently authenticated user",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
c, err := r.client()
if err != nil {
return err
@@ -111,7 +111,7 @@ func (r *Root) registerCmd() *cobra.Command {
Use: "register [server]",
Short: "Create a new account on a urapt server (first account becomes admin)",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
server := r.flagServer
if len(args) == 1 {
server = args[0]
@@ -175,7 +175,7 @@ func (r *Root) tokenCreateCmd() *cobra.Command {
c := &cobra.Command{
Use: "create",
Short: "Create a new API token",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
client, err := r.client()
if err != nil {
return err
@@ -202,7 +202,7 @@ func (r *Root) tokenListCmd() *cobra.Command {
c := &cobra.Command{
Use: "list",
Short: "List your API tokens",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
client, err := r.client()
if err != nil {
return err
@@ -238,7 +238,7 @@ func (r *Root) tokenRevokeCmd() *cobra.Command {
Use: "revoke <id>",
Short: "Revoke an API token by id",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
client, err := r.client()
if err != nil {
return err