Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1013)

Unified Diff: lib/src/io.dart

Issue 1470263004: Add "-i" to command line to specify leading indent. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/formatter_options.dart ('k') | test/command_line_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/io.dart
diff --git a/lib/src/io.dart b/lib/src/io.dart
index e435ace7089e4c88a347c09cadf58c5ba86774e1..51f380585dc8486f17ff2474e3723d905dd12937 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -67,7 +67,8 @@ bool processDirectory(FormatterOptions options, Directory directory) {
bool processFile(FormatterOptions options, File file, {String label}) {
if (label == null) label = file.path;
- var formatter = new DartFormatter(pageWidth: options.pageWidth);
+ var formatter =
+ new DartFormatter(indent: options.indent, pageWidth: options.pageWidth);
try {
var source = new SourceCode(file.readAsStringSync(), uri: file.path);
options.reporter.beforeFile(file, label);
« no previous file with comments | « lib/src/formatter_options.dart ('k') | test/command_line_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698