validate

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package validate provides the validate command for mappa.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "validate [file]",
	Short: "Validate an import map for spec violations",
	Long: `Validate an import map file against the WHATWG import map specification.

Reads an import map from a file argument or stdin, checks for spec violations
(trailing-slash consistency, URL format, scope key validity), and reports errors.
Exits 0 if the import map is valid, 1 if there are violations.`,
	Example: `  # Validate an import map file
  mappa validate importmap.json

  # Validate from stdin
  cat importmap.json | mappa validate

  # Machine-readable JSON output
  mappa validate importmap.json --format json`,
	Args:         cobra.MaximumNArgs(1),
	SilenceUsage: true,
	RunE:         run,
}

Cmd is the validate cobra command that checks import maps for WHATWG spec violations.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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