Read source code from stdin, output formatted file to stdout.

Usage:
  v fmt [options] path_to_source.v [path_to_other_source.v]
  v fmt [options] path/to/dir [path/to/other_dir]
  cat source.v | v fmt

Formats the given V source files or recursively formats all files in the
directory, then prints their formatted source to stdout.

By default, `v fmt` also migrates usage of the removed `json` module to the
pure V `json2` module (`import json` -> `import json2`,
`json.decode(T, s)` -> `json2.decode[T](s)`,
`json.encode(x)` -> `json2.encode(x, escape_unicode: true, time_as_unix: true)`,
`json.encode_pretty(x)` -> `json2.encode(x, prettify: true, legacy_layout: true,
escape_unicode: true, time_as_unix: true)`).
The added options keep the output of the old module.
vfmt fixtures (`.vv`) are left untouched, and so are files whose `import json`
resolves to a project's own `json` module. Use `-no-migrate-json2` to disable
the rewrite.

During the transition to the V3 formatter, the `-verify` and `-c` check modes
accept files matching either V3 or legacy vfmt output. Output and write modes
use V3 formatting, so `v fmt -w` may rewrite a file accepted by a check mode.

Options:
  -c             Check if a file is already formatted. If not, print the
                 filepath and exit with code 2. Compared to -verify it is
                 quicker but has a small trade-off in precision.

  -diff          Display the differences between the formatted source(s)
                 and the original source(s). This will attempt to find a
                 working `diff` command automatically unless you specify one
                 with the VDIFF_CMD environment variable.

  -l             List files whose formatting differs from vfmt.

  -w             Write result to (source) file(s) instead of to stdout.

  -backup        In combination with `-w`, copy the original `file.v` to a
                 `file.v.bak` backup, before overwriting the original source
                 file.

  -debug         Print the kinds of encountered AST statements/expressions
                 on stderr.

  -verify        Make sure the provided file is already formatted. Useful for
                 checking code contributions in CI for example.

  -inprocess     Do everything in the same process. More prone to crashes in
                 case of parser bugs for invalid source files, and it needs
                 more memory, but it is faster for thousands of files, since
                 it avoids the interprocess communication overhead.

  -new_int       Forcefully cast the `int` type in @[translated] modules or
                 in the definition of `C.func` to the `i32` type.

  -no-migrate-json2
                 Do not rewrite removed `json` module usage to `json2`.
                 The migration is on by default for `.v` files, including
                 tests (`_test.v`).

Environment Variables:
  VDIFF_CMD      A custom tool and options that will be used for viewing the
                 differences between the original and the temporarily formatted
                 files, e.g.: `VDIFF_CMD="diff -y -W 100" v fmt -diff path/file.v`
