forked from rust-lang/rustfmt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Add field for restricting formating to specific lines
This commit adds a `file_lines_map` field to `Config`. This is an optional field that when present stores a map from file names to sets of lines to format. The code to use this field will come in a later commit. This includes code to parse a file name / line set specification that is used for `Config::override_value()` and will be used to parse the command line option. Adding `nom` as a dependency for parsing increases the incremental rustfmt build time by 0.96s on a machine where it takes ~23s to build rustfmt. Refs rust-lang#434
- Loading branch information
1 parent
5a6df6b
commit 365f794
Showing
4 changed files
with
123 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ log = "0.3" | |
env_logger = "0.3" | ||
getopts = "0.2" | ||
itertools = "0.4" | ||
nom = "1.2.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters