This directory contains all of the SystemVerilog-specific formatter implementation.
Tool user documentation can be found here.
Full developer documentation can be found here.
Below is a quick summary of the major components.
formatter.h contains the top-level entry point into the formatter. Text-in-text-out tests are split by concern to reduce merge conflicts:
VerifyFormatting`uvm, directivesverilog_format on/offNew GitHub-issue formatter regressions belong in formatter_issue_regression_test.cc only (do not append them to formatter_test.cc).
FormatStyle defines ways in which formatting can be configured.
token_annotator.h marks up a token stream with formatting constraints such as minimum spacing, and always/never-wrap.
TreeUnwrapper converts a SV syntax tree into a language-agnostic TokenPartitionTree representation for doing formatting operations.
align.h implements everything related to tabular alignment of specific sections of code.
comment_controls.h implements comment directives thet disable formatting on ranges of text.