Format Command



The hof fmt command is used to work with formatter containers and can also format directories of code without needing to install language specific tools.

hof fmt -h

With hof fmt, you can
  1. format any language from a single tool
  2. run formatters as api servers for IDEs and hof
  3. manage the underlying formatter containers

Usage:
  hof fmt [filepaths or globs] [flags]
  hof fmt [command]

Available Commands:
  info        get formatter info
  pull        docker pull a formatter
  start       start a formatter
  stop        stop a formatter
  test        test that formatter(s) are working

Flags:
      --fmt-data   include cue,yaml,json,toml,xml files, set to false to disable (default true)
  -h, --help       help for fmt

Global Flags:
  -E, --all-errors               print all available errors
  -i, --ignore-errors            turn off output and assume defaults at prompts
  -D, --include-data             auto include all data files found with cue files
  -V, --inject-env               inject all ENV VARs as default tag vars
  -I, --input stringArray        extra data to unify into the root value
  -p, --package string           the Cue package context to use during execution
  -l, --path stringArray         CUE expression for single path component when placing data files
  -q, --quiet                    turn off output and assume defaults at prompts
  -d, --schema stringArray       expression to select schema to apply to data files
      --stats                    print generator statistics
  -0, --stdin-empty              A flag that ensure stdin is zero and does not block
  -t, --tags stringArray         @tags() to be injected into CUE code
  -U, --user-files stringArray   file globs to embed into the root value (<cue-path>=<file-glob>), use % as slash to trim before
  -v, --verbosity int            set the verbosity of output
      --with-context             add extra context for data files, usable in the -l/path flag

Use "hof fmt [command] --help" for more information about a command.