fx format-code
runs source formatters on modified files via SHAC
Usage: fx format-code [options] [files...] [-- shac_args...]
Runs source formatters registered in SHAC on modified source files
(or on explicit files if specified).
Options:
--emit Emit formatted output to stdout instead of modifying files.
--all Format all tracked files in the repository.
--only <check> Run only the specified formatter(s) (comma-separated or repeated).
--skip <check> Skip the specified formatter(s) (comma-separated or repeated).
--files <files> Comma-separated list of specific files to format.
-v, --verbose Print verbose command execution output.
--dry-run Print shac commands without executing.
format-code source code
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-18 UTC."],[],[]]