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
+9 -9
View File
@@ -22,7 +22,7 @@ func (r *Root) distroCreateCmd() *cobra.Command {
Use: "create <repo> <distro>",
Short: "Add a distribution to a repository",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -46,7 +46,7 @@ func (r *Root) distroListCmd() *cobra.Command {
Use: "list <repo>",
Short: "List distributions in a repository",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -72,7 +72,7 @@ func (r *Root) distroDeleteCmd() *cobra.Command {
Use: "delete <repo> <distro>",
Short: "Delete a distribution and its packages",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -100,7 +100,7 @@ func (r *Root) componentCreateCmd() *cobra.Command {
Use: "create <repo> <distro> <component>",
Short: "Add a component to a distribution",
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -124,7 +124,7 @@ func (r *Root) componentListCmd() *cobra.Command {
Use: "list <repo> <distro>",
Short: "List components in a distribution",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -150,7 +150,7 @@ func (r *Root) componentDeleteCmd() *cobra.Command {
Use: "delete <repo> <distro> <component>",
Short: "Delete a component",
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -178,7 +178,7 @@ func (r *Root) archAddCmd() *cobra.Command {
Use: "add <repo> <distro> <arch>",
Short: "Add an architecture to a distribution",
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -202,7 +202,7 @@ func (r *Root) archListCmd() *cobra.Command {
Use: "list <repo> <distro>",
Short: "List architectures in a distribution",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err
@@ -228,7 +228,7 @@ func (r *Root) archRemoveCmd() *cobra.Command {
Use: "remove <repo> <distro> <arch>",
Short: "Remove an architecture from a distribution",
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
c, err := r.client()
if err != nil {
return err