Skip to content

feat: migrate github.com/urfave/cli to v3 #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 6, 2025
Merged

feat: migrate github.com/urfave/cli to v3 #369

merged 5 commits into from
Jul 6, 2025

Conversation

obalunenko
Copy link
Owner

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 6, 2025 10:03
@obalunenko obalunenko self-assigned this Jul 6, 2025
@obalunenko obalunenko added dependencies enhancement New feature or request labels Jul 6, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the project from urfave/cli v2 to v3 by updating dependencies, adjusting application setup and callback signatures, and refreshing release and lint configurations.

  • Bumped github.com/urfave/cli to v3 in go.mod
  • Adapted CLI initialization, commands, flags, and hooks to v3 interfaces
  • Updated .goreleaser.yml and .golangci.yml (and pipeline variant) to support new targets and formatter/linter settings

Reviewed Changes

Copilot reviewed 8 out of 126 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Replaced cli v2 with v3
cmd/aoc-cli/main.go Switched app creation and Run call to v3 patterns
cmd/aoc-cli/handlers.go Updated Before, After, and error‐handling hook signatures
cmd/aoc-cli/flags.go Migrated flag structs to v3 style
cmd/aoc-cli/commands.go Simplified commands() signature and action assignment
.goreleaser.yml Added ARM builds, ignored darwin/arm, adjusted replace and archive IDs
.golangci.yml Cleaned up old settings, enabled new linters, tightened rules
.golangci.pipe.yml Streamlined pipeline lint config
Comments suppressed due to low confidence (4)

cmd/aoc-cli/handlers.go:50

  • [nitpick] The error wrap reads "print version" inside printHeader; it would be clearer as "print header" to match the function’s purpose.
		return ctx, fmt.Errorf("print version: %w", err)

.golangci.yml:53

  • The file‐pattern !**/*_a _file.go appears malformed (space and underscore). Please verify and correct the intended path regex.
            - '!**/*_a _file.go'

cmd/aoc-cli/main.go:29

  • The top‐level application should be an *cli.App (e.g. app := &cli.App{} or use cli.NewApp()) rather than a cli.Command.
	app := cli.Command{}

cmd/aoc-cli/main.go:45

  • Run on a cli.Command does not accept a context and args; you need to call app.Run(os.Args) on a *cli.App.
	if err := app.Run(ctx, os.Args); err != nil {

Copy link

sonarqubecloud bot commented Jul 6, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@obalunenko obalunenko merged commit af7c2f2 into master Jul 6, 2025
14 of 17 checks passed
@obalunenko obalunenko deleted the develop branch July 6, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant