Command-Line documentation
bronto-refactor
This document contains the help content for the bronto-refactor command-line program.
bronto-refactor
Usage: bronto-refactor <COMMAND>
Subcommands:
run— Runs the tool, generating edits in the.fossilformatmerge— Takes one or more.fossilfiles and merges them into a single fileformat— Converts edit-describing files between supported formatsapply— Takes one or more.fossilfiles and applies the changescount— Reports the number of lines modifiable by the toolcompiler-explorer— Version of the tool designed to interact with Compiler Explorer
bronto-refactor run
Runs the tool, generating edits in the .fossil format
Usage: bronto-refactor run [OPTIONS] --output <OUTPUT> [CLANG]...
Arguments:
<CLANG>— Arguments to be passed to Clang. Must not be specified if --db is present
Options:
-
-o,--output <OUTPUT>— The location to write the.fossilfile -
--config <CONFIG>— The location of a TOML configuration file controlling this tool -
--interactive— Indicates whether the tool is being run interactively. Defaults totrue. Can use--no-interactivefor falseDefault value:
true -
--volatile— Iftrue, processing will happen whether or not a cached result already exists. Caching is keyed on the compilation command, not the content of the files being processed -
--clang-path <CLANG_PATH>— The path to an instance of Clang installed on this machine from which we can detect the system include directories -
--db <DB>— Location of a compilations database JSON file. Must not be specified if clang arguments are directly supplied -
-j,--jobs <JOBS>— Number of threads on which to process input. If not provided, a reasonable default will be chosen. There are no guarantees about the specific value chosen, but a reasonable effort is made to detect an appropriate number for the host system -
--include <INCLUDE>— Paths to header files to be included in every translation unit while processing. Typically this is used to include refactoring recipes that don't otherwise have a reasonable existing header to live in -
--retain <RETAIN>[alias:filter] — A glob that filters keys in the compilation database referenced via --db. Only entries in the compilation database that match the glob will be processedDefault value:
**
bronto-refactor merge
Takes one or more .fossil files and merges them into a single file
Usage: bronto-refactor merge [OPTIONS] --output <OUTPUT> <--manifest <MANIFEST>|FILES>
Arguments:
<FILES>— A sequence of.fossilfiles
Options:
--output <OUTPUT>— The location the merged.fossilfile should be written to--log-to-stderr--manifest <MANIFEST>— A file containing a newline-separated list of all.fossilfiles
bronto-refactor format
Converts edit-describing files between supported formats
Usage: bronto-refactor format [OPTIONS] --from <FROM> --to <TO> --input <INPUT> --output <OUTPUT>
Options:
-
-f,--from <FROM>Possible values:
fossil,patch -
-t,--to <TO>— The format into which the file should be convertedPossible values:
fossil,patch -
-i,--input <INPUT>— The input file to be reformatted -
-o,--output <OUTPUT>— The location the output file should be written to -
--log-to-stderr
bronto-refactor apply
Takes one or more .fossil files and applies the changes
Usage: bronto-refactor apply [OPTIONS] <--manifest <MANIFEST>|FILES>
Arguments:
<FILES>— A sequence of.fossilfiles
Options:
-
--config <CONFIG>— The location of a TOML configuration file controlling this tool -
--interactive— Indicates whether the tool is being run interactively. Defaults totrue. Can use--no-interactivefor falseDefault value:
true -
--manifest <MANIFEST>— A file containing a newline-separated list of all.fossilfiles
bronto-refactor count
Reports the number of lines modifiable by the tool
Usage: bronto-refactor count [OPTIONS] [CLANG]...
Arguments:
<CLANG>— Arguments to be passed to Clang. Must not be specified if --db is present
Options:
-
--depth <DEPTH>— Display line counts totals for directories up to this depthDefault value:
1 -
--config <CONFIG>— The location of a TOML configuration file controlling this tool -
--interactive— Indicates whether the tool is being run interactively. Defaults totrue. Can use--no-interactivefor falseDefault value:
true -
--volatile— Iftrue, processing will happen whether or not a cached result already exists. Caching is keyed on the compilation command, not the content of the files being processed -
--clang-path <CLANG_PATH>— The path to an instance of Clang installed on this machine from which we can detect the system include directories -
--db <DB>— Location of a compilations database JSON file. Must not be specified if clang arguments are directly supplied -
-j,--jobs <JOBS>— Number of threads on which to process input. If not provided, a reasonable default will be chosen. There are no guarantees about the specific value chosen, but a reasonable effort is made to detect an appropriate number for the host system -
--include <INCLUDE>— Paths to header files to be included in every translation unit while processing. Typically this is used to include refactoring recipes that don't otherwise have a reasonable existing header to live in -
--retain <RETAIN>[alias:filter] — A glob that filters keys in the compilation database referenced via --db. Only entries in the compilation database that match the glob will be processedDefault value:
**
bronto-refactor compiler-explorer
Version of the tool designed to interact with Compiler Explorer
Usage: bronto-refactor compiler-explorer [OPTIONS] <FILE> [CLANG]...
Arguments:
<FILE>— The file whose modified contents should be displayed<CLANG>— Arguments to be passed to Clang
Options:
-
-c,--clang-path <CLANG_PATH>— The path to an instance of Clang installed on this machine from which we can detect the system include directories -
--clang-format-path <CLANG_FORMAT_PATH>— The path to an instance of clang-format installed on this machine -
-o,--output <OUTPUT>— The location to write the modified file contents, orstdoutif not provided -
--include <INCLUDE>— Paths to header files to be included in every translation unit while processing. Typically this is used to include refactoring recipes that don't otherwise have a reasonable existing header to live in -
--log-to-stderrDefault value:
true -
--config <CONFIG>— The location of a TOML configuration file controlling this tool