Documentation
¶
Overview ¶
Command widgetc validates widget documents and prints their findings.
Go's internal import rule allows packages below pkg/widget to import pkg/widget/internal/uigen. This command is inside that tree, so the import is permitted even though widgetc and uigen are different packages. Packages outside pkg/widget cannot import uigen, including others in the same module.
It is contributor tooling for this repository, not a product surface: a consumer of the widget package never runs it, and nothing outside this module depends on its flags, its output or its exit status. The library entry point is widget.Interpret, and a build system that needs validation should call that rather than shell out to this.
Usage:
widgetc validate [-quiet] <file...> widgetc generate -package <name> -out <dir> <file>
Exit status is 0 when every document is clean, 1 when any finding was reported or a document could not be generated, and 2 when a document could not be read at all or the command line was wrong. The third is a failure too: an unrun check must never read as a pass.