cliv3

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 5 Imported by: 0

README

yze-go-cliv3

A go/analysis analyzer in the gomatic yze suite. It enforces the gomatic CLI standard that command-line programs use urfave/cli v3 — reporting any import of the legacy github.com/urfave/cli (v1) or github.com/urfave/cli/v2 paths.

  • Rule id: yze/cliv3
  • Capability: convention:cliv3

Use

Run via the yze aggregator (recommended) or standalone:

go run github.com/gomatic/yze-go-cliv3/cmd/yze-go-cliv3@latest ./...

A finding looks like:

main.go:4:2: use urfave/cli/v3; the legacy urfave/cli v1/v2 import path is forbidden by the gomatic CLI standard

Documentation

Overview

Package cliv3 provides a go/analysis analyzer enforcing the gomatic CLI standard that command-line programs use urfave/cli v3 — never the legacy v1 ("github.com/urfave/cli") or v2 ("github.com/urfave/cli/v2") import paths.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "cliv3",
	Doc:      "reports imports of the legacy urfave/cli v1/v2, which the gomatic CLI standard forbids in favor of v3",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer reports imports of the legacy urfave/cli v1/v2 packages.

View Source
var Registration = goyze.Registration{
	Name:       "cliv3",
	Categories: []goyze.Category{"cli"},
	URL:        "https://docs.gomatic.dev/yze/cliv3",
	Analyzer:   Analyzer,
}

Registration declares this analyzer to the yze framework.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
yze-go-cliv3 command
Command yze-go-cliv3 runs the cliv3 analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
Command yze-go-cliv3 runs the cliv3 analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL