cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cmd is the dispatcher for the anarch-lint CLI. It registers all commands and routes incoming arguments to the matching command implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) error

Run parses args and dispatches to the matching command. args must not include the executable name (pass os.Args[1:]).

Every flag can be set via a ANARCH_LINT_-prefixed environment variable. The mapping rule is: prepend ANARCH_LINT_, uppercase, replace dashes with underscores.

Flags supplied on the command line always take precedence over env vars.

Run prints the selected command's help to stderr only for --help and for usage errors (anything matching ErrUsage in the root package: parse failures, an unknown subcommand, or a command returning a UsageError). Other errors are returned without help, for main to print as "error: ...".

Types

This section is empty.

Directories

Path Synopsis
Package analyze implements the "analyze" CLI command.
Package analyze implements the "analyze" CLI command.
Package balance implements the "balance" CLI command.
Package balance implements the "balance" CLI command.
Package baseline implements the "baseline" CLI command.
Package baseline implements the "baseline" CLI command.
Package check implements the "check" CLI command.
Package check implements the "check" CLI command.
Package connascence implements the "connascence" CLI command.
Package connascence implements the "connascence" CLI command.
Package diagram implements the "diagram" CLI command.
Package diagram implements the "diagram" CLI command.
Package draft implements the "draft" CLI command.
Package draft implements the "draft" CLI command.
Package explain implements the "explain" CLI command.
Package explain implements the "explain" CLI command.
Package fitness implements the "fitness" CLI command.
Package fitness implements the "fitness" CLI command.
Package format implements the "fmt" CLI command.
Package format implements the "fmt" CLI command.
Package judge implements the "judge" CLI command and its subcommands emit, admit and report.
Package judge implements the "judge" CLI command and its subcommands emit, admit and report.
Package render implements the "render" CLI command.
Package render implements the "render" CLI command.
Package root defines the root configuration for the CLI.
Package root defines the root configuration for the CLI.
Package schema implements the "schema" CLI command.
Package schema implements the "schema" CLI command.
Package validate implements the "validate" CLI command.
Package validate implements the "validate" CLI command.
Package version implements the "version" CLI command.
Package version implements the "version" CLI command.

Jump to

Keyboard shortcuts

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